HighTechTalks DotNet Forums  

Re: Thread/join

Dotnet VJSharp microsoft.public.dotnet.vjsharp


Discuss Re: Thread/join in the Dotnet VJSharp forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
AT
 
Posts: n/a

Default Re: Thread/join - 11-06-2003 , 03:01 PM






From MSDN Docs on the Join method:

"
Remarks
Use this method to ensure a thread has terminated. The caller will block
indefinitely if the thread does not terminate.

This method changes the state of the calling thread to include
ThreadState.WaitSleepJoin. You cannot invoke Join on a thread that is in
the ThreadState.Unstarted state.
"

I think what you are doing is invoking Join on a thread that is in the
ThreadState.Unstarted state.

If there is a bug, it is probably that this bit is not tested on calls to
Join. If that is what you are doing, the calling thread should throw an
IllegalThreadStateException or something in Join, maybe.

Perhaps you could do that in your thread wrapper class ...

I think I will let somebody else comment on your wrapper class because just
looking at it gives me a brain freeze headache

Really good weblogs on this stuff can be found on www.gotdotnet.com. I
would suggest reading Christopher Brumme's stuff - good detailed accounts
on the CLR internals and well written, easy to read.

Bob LaCasse
Microsoft Developer Support - Visual J#.NET

This posting is provided AS IS with no warranties, and confers no rights.


Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.