Open topic with navigation
<viztask:Signal>.send
Send a signal to all waiting objects
<viztask:Signal>.send( |
|
data = None |
num = -1 |
) |
|
data = None
Optional data that will be sent to the objects waiting for the signal.
num = -1
The number of objects to send the signal to.
If num is less than 0, then the signal will be sent to all objects.
Remarks
This command will send a signal to all objects waiting on the signal.
Return Value
The number of objects that were signalled
Example
import viztask
s = viztask.Signal()
def MyTask():
while True:
yield s.wait()
print('Signalled')
viztask.schedule( MyTask() )
vizact.onkeydown(' ',s.send)