Sorry to resurrect a dead topic but I too have a need for this same type of behavior. Has anyone figured out how to do this? Is there a better way of doing this?
if you also use threads like the initial poster, this should answer the question:
So you have to change your concept. Probably your error is a result of using disallowed threading.