<viztask:Signal>.wait

Wait for a signal to be sent

 

<viztask:Signal>.wait()

 

Remarks

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:

Property

data

The data received from the signal


Return Value

viztask.Condition object

Example

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')