[EMAIL PROTECTED] wrote:
For the second question, the PRThreadState needs to be set to STATE_UNJOINABLE if you wish to have the main thread return control after starting the worker thread.
Err, that is quite wrong. It looks like you misunderstood the purpose of the Join() function. The entire point of it is to block the current thread until the other thread is finished. Therefore, it makes little sense to call it immediately after thread creation.
The reason it works now is that you can't join an unjoinable thread, so the call does nothing, and probably returns an error.
Note that you do have to call Join() at some point if you create a joinable thread, otherwise you leak memory. But you should do it "later" (when exactly depends on what the thread does...)
-christian _______________________________________________ dev-tech-xpcom mailing list [email protected] https://lists.mozilla.org/listinfo/dev-tech-xpcom
