Sunday, August 24, 2008 01:24 PM
I think the concept of "running" is what you have a problem with. It would be difficult to pass information to code that is in the process of executing. That code must be interrupted to pass a parameter to it. Either by the thread itself or a thread controller.
When you create a thread, you are creating an Object that has the inherited properties of a Thread. You must stop the thread, pass the parameter to the thread via some method you have put on the thread and then restart it to get it to work with the new parameter.
If it comes to the point in the threads execution that it needs the parameter, the thread should recognize it, stop, send a request to some code to put the parameter there and restart. OR if a parameter changes, the thread controller should stop the thread, put the parameter there and restart.
I may be wrong, but at least that is the way I do it, because otherwise you have stuff changing willy nilly.