THE ORIONIS API
Build with clarity.
Explore the building blocks of an async-first Python framework. Every module, class, and method — connected, searchable, and ready to build with.
class documentation
class BoundedExecutor: (source)
Constructor: BoundedExecutor(max_workers, max_pending, name)
Own a lazy thread pool with bounded running and queued work.
Admission is process-wide per instance, including across event loops. Cancellation waits for running native work; queued work is cancelled.
| Method | __init__ |
Configure a lazy worker pool. |
| Async Method | aclose |
Close without blocking the event loop. |
| Method | close |
Drain accepted work and release the pool's threads. |
| Async Method | run |
Execute a synchronous callable with copied context and bounded admission. |
| Instance Variable | _capacity |
Synchronization primitive controlling access to capacity. |
| Instance Variable | _closed |
Whether this resource has completed its close lifecycle. |
| Instance Variable | _lock |
Lock protecting concurrent access to shared state. |
| Instance Variable | _name |
Prefix used for worker thread names. |
| Instance Variable | _pool |
Thread pool used to execute admitted blocking operations. |
| Instance Variable | _workers |
Maximum simultaneous native calls. |
Close without blocking the event loop.
Wait for accepted work to finish and join the pool's threads.
| Returns | |
None | No return value. |
Drain accepted work and release the pool's threads.
Reject further submissions once closing starts.
| Returns | |
None | No return value. |
async def run(self:
Self, callback: Callable[ ..., T], /, *args: object, **kwargs: object) -> T:
(source)
¶
Execute a synchronous callable with copied context and bounded admission.
| Parameters | |
callback:collections.abc.Callable[..., T] | Synchronous operation with thread-safe dependencies. |
*args:object | Positional callback arguments. |
**kwargs:object | Keyword callback arguments. |
| Returns | |
T | Result from the worker thread. |