This command will create a Condition object that will wait for a signal to be sent.
The yielded command returns a
viz.Data object with the following information about the Condition:
data | The data received from the signal |
Example 1:
import viztask
s = viztask.Signal()
def MyTask():
while True:
yield s.wait()
print('Signalled')
viztask.schedule( MyTask() )
vizact.onkeydown(' ',s.send)
Example 2:import viztask
s = viztask.Signal()
def MyTask():
while True:
d = yield s.wait()
print('Signalled with data:',d.data)
viztask.schedule( MyTask() )
vizact.onkeydown(' ',s.send,'My signal')