In Arvinder's question, he's asking about the BackgroundWorker class. In order to use Join, you'd have to have a thread object. Ignoring the fact that the DoWork handler would have to get it's Thread object to the main UI, the framework uses a thread-pool thread for the DoWork event handler to get the asynchronicity. You have race condition between when that thread was used for the DoWork event handler and when that thread is reused for something else, a call to Join on that thread could end up waiting for a completely different operation, likely resulting in a deadlock.
On Thu, 19 Jul 2007 15:12:25 -0400, kara hewett <[EMAIL PROTECTED]> wrote: >The Join method blocks the calling thread until the specified thread exits. >If your application creates multiple threads, then join the threads together >and wait for all the threads to end before continuing your processing. The >myPendingJob class would accept the arguments required for running the job. >Each thread worker in myPendingJobThread processes its instance of >myPendingJob. > >This example below provides a simple scenario without any scheduling or >handling beyond "fire and forget" threading. =================================== This list is hosted by DevelopMentorĀ® http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com