Allof
Wait for all events in a set to complete.
AllOf
Bases: Event
Wait for all of a set of events.
Source code in src/asimpy/allof.py
9 10 11 12 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 42 43 | |
__init__(env, **events)
Construct new collective wait.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
env
|
Environment
|
simulation environment. |
required |
events
|
Any
|
name=thing items to wait for. |
{}
|
Raises:
| Type | Description |
|---|---|
ValueError
|
if no events provided. |
Example:
name, value = await AllOf(env, a=q1.get(), b=q2.get())
Source code in src/asimpy/allof.py
12 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 | |