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.
module documentation
Provide support operations.
Includes WorkQueueFullError, complete_on_cancel, BoundedExecutor, threaded.
| Class | |
Own a lazy thread pool with bounded running and queued work. |
| Exception | |
Signal that a bounded worker pool cannot admit another operation. |
| Async Function | complete |
Wait for owned work before propagating caller cancellation. |
| Function | threaded |
Opt a synchronous handler into bounded thread execution. |
| Constant | _CALLBACK |
Callback workers used by concurrency. |
async def complete_on_cancel(awaitable:
Awaitable[ T], *, on_cancel: Callable[ [], object] | None = None) -> T:
(source)
¶
Wait for owned work before propagating caller cancellation.
| Parameters | |
awaitable:collections.abc.Awaitable[T] | Operation that must finish before its resources can be released. |
oncollections.abc.Callable[[], object] | None | Optional request to stop work that has not started yet. |
| Returns | |
T | Operation result unless the caller was cancelled. |
Opt a synchronous handler into bounded thread execution.
| Parameters | |
callback:collections.abc.Callable[P, T] | Blocking synchronous function. Dependencies must support worker threads. |
| Returns | |
collections.abc.Callable[P, collections.abc.Awaitable[T]] | Async wrapper preserving the signature used for dependency injection. Context variables propagate; CPU-bound Python still contends for the GIL. |