Theading problem

Please support our C# advertiser: Intel Parallel Studio Home
Reply

Join Date: Dec 2004
Posts: 489
Reputation: Acidburn is an unknown quantity at this point 
Solved Threads: 5
Acidburn Acidburn is offline Offline
Posting Pro in Training

Theading problem

 
0
  #1
Nov 18th, 2008
Hey guys, my main thread seems to stop when i start 2 new threads and start them off. It sits and waits for the 2 threads to finish.

The two threads are created off a factory class. Is this why? Its not created in the GUI class?

Cheers.
Reply With Quote Quick reply to this message  
Join Date: Aug 2008
Posts: 1,160
Reputation: dickersonka will become famous soon enough dickersonka will become famous soon enough 
Solved Threads: 137
dickersonka dickersonka is offline Offline
Veteran Poster

Re: Theading problem

 
0
  #2
Nov 18th, 2008
when those others are launched, does it contain something like ?

  1. Thread.CurrentThread.Suspend()

or

  1. myThreadName.Join()
Last edited by dickersonka; Nov 18th, 2008 at 12:33 pm.
Custom Application & Software Development
www.houseshark.net
Reply With Quote Quick reply to this message  
Join Date: Dec 2004
Posts: 489
Reputation: Acidburn is an unknown quantity at this point 
Solved Threads: 5
Acidburn Acidburn is offline Offline
Posting Pro in Training

Re: Theading problem

 
0
  #3
Nov 18th, 2008
it contains a join(), but shouldn't all threads spawned from the parent contain this?
Last edited by Acidburn; Nov 18th, 2008 at 12:37 pm.
Reply With Quote Quick reply to this message  
Join Date: Aug 2008
Posts: 1,160
Reputation: dickersonka will become famous soon enough dickersonka will become famous soon enough 
Solved Threads: 137
dickersonka dickersonka is offline Offline
Veteran Poster

Re: Theading problem

 
0
  #4
Nov 18th, 2008
the join will let you know when the thread has been completed, but will also block the calling thread (as in your case the ui is unresponsive), when waiting for the threads to complete

i'm not sure how your threads exit, but while waiting you can check either ThreadState or IsAlive
Custom Application & Software Development
www.houseshark.net
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Other Threads in the C# Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC