View Single Post
Old 04-24-2006, 11:06 AM
Hodge1620 Hodge1620 is offline
Join Date: Aug 2005
Posts: 12
Parallel Threads

Hi - I have some substantial processing that needs to happen within a continuous timer, and I am trying to split the processing into multiple threads that can run in parallel. (My alternative is to stick with my current framerate of 5 frames per second.) However, it seems that any command using the 'thread' module causes vizard to crash, burn, and run away screaming. For example, the following script runs perfectly well in pythonwin, but when run in Vizard, it asks me to send an error report to Microsoft....

import thread

def sayHello(id):
print "Hello from thread", id

for i in range(5):
thread.start_new_thread(sayHello, (i,))

Is this a unique problem to Vizard 2.1 (which I am using to debug)? Do I need to do something special to prevent the crash? Alternatively, (by reading in-between the lines of your documentation) it seems that the viz.director() function might allow for seperate threads. Is this a correct assessment, or is there some other way to handle threading?

Eric Hodgson
Miami University: SpaceLab
Reply With Quote