View Single Post
  #2  
Old 10-07-2010, 12:14 PM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
Timer events behave differently than all other events. They are only sent to the event handler that started the timer. Also, waiting for any timer event doesn't seem very useful, since a lot of other vizard modules use timer events internally.

I would suggest using viztask.Signal objects. The documentation contains sample code for using task signals. The following code shows how to create a task signal:
Code:
timer_signal = viztask.Signal()
In your timer callback you can trigger the signal:
Code:
timer_signal.send()
And in your task you can wait for the signal to be triggered using this code:
Code:
yield timer_signal.wait()
Reply With Quote