Runtime
Runtime environment and lifecycle management for DAG execution.
Runtime context counter for tracking active DAG contexts.
AsyncRuntimeCounter
Asynchronous counter for active contexts.
Source code in shutils/dag/runtime.py
66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 | |
__init__(runtime_counter)
Initialize with the underlying counter mixin.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
runtime_counter
|
RuntimeCounterMixin
|
The mixin instance to wrap. |
required |
Source code in shutils/dag/runtime.py
69 70 71 72 73 74 75 | |
decrease()
async
Atomically decrement the context counter.
Source code in shutils/dag/runtime.py
82 83 84 85 | |
increase()
async
Atomically increment the context counter.
Source code in shutils/dag/runtime.py
77 78 79 80 | |
Runtime
Bases: RuntimeCounterMixin
Runtime object for tracking active DAG contexts.
Source code in shutils/dag/runtime.py
88 89 90 91 92 93 | |
__init__()
Initialize the runtime counter.
Source code in shutils/dag/runtime.py
91 92 93 | |
RuntimeCounterMixin
Mixin providing a thread-safe counter for tracking active contexts.
Source code in shutils/dag/runtime.py
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 | |
async_counter
property
Lazy accessor for the asynchronous counter interface.
counter
property
Current number of active contexts.
sync_counter
property
Lazy accessor for the synchronous counter interface.
__init__()
Initialize the counter with sync and async interfaces.
Source code in shutils/dag/runtime.py
16 17 18 19 20 21 22 | |
SyncRuntimeCounter
Synchronous thread-safe counter for active contexts.
Source code in shutils/dag/runtime.py
44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 | |
__init__(runtime_counter)
Initialize with the underlying counter mixin.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
runtime_counter
|
RuntimeCounterMixin
|
The mixin instance to wrap. |
required |
Source code in shutils/dag/runtime.py
47 48 49 50 51 52 53 | |
decrease()
Atomically decrement the context counter.
Source code in shutils/dag/runtime.py
60 61 62 63 | |
increase()
Atomically increment the context counter.
Source code in shutils/dag/runtime.py
55 56 57 58 | |