class documentation
class BoundedVisitorFunctions(VisitorFunctions): (source)
Constructor: BoundedVisitorFunctions(inner, concurrency_limit)
Wraps VisitorFunctions to cap concurrent payload visits via a semaphore.
After the full traversal, call drain() to await all in-flight tasks.
| Method | __init__ |
Create a bounded wrapper around the given visitor functions. |
| Method | checkpoint |
Return a marker for tasks scheduled after this point. |
| Async Method | drain |
Wait for all in-flight background tasks to complete. |
| Async Method | drain |
Wait for tasks scheduled after checkpoint to finish. |
| Async Method | visit |
Visit a single payload once capacity is available. |
| Async Method | visit |
Visit a sequence of payloads once capacity is available. |
| Async Method | visit |
Visit a system Nexus envelope payload once capacity is available. |
| Async Method | _drain |
Wait for the given tasks, cancelling all tasks if one fails. |
| Instance Variable | _inner |
Undocumented |
| Instance Variable | _sem |
Undocumented |
| Instance Variable | _tasks |
Undocumented |
Wait for all in-flight background tasks to complete.
On cancellation or error, cancels all remaining tasks and awaits them so their finally blocks run before this coroutine returns.
Wait for tasks scheduled after checkpoint to finish.
This lets system-envelope traversal finish mutating its decoded value before that value is serialized again, without waiting for unrelated visits that were already in progress.