dcsimg
How to make "some other" thread go to sleep???
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Sriprasad_Bhat
Posted On:   Thursday, April 15, 2004 04:35 AM

Lets say that I have a certain amount of threads running. Whenever a new thread is created I check certain condition, which if satisfied then normal operation continues. However if not then I need to make some other thread sleep for some time. Is this possible?? If not what else can be done?? ( I need to limit the number of threads currantly running )

Re: How to make "some other" thread go to sleep???

Posted By:   Simon_Ablett  
Posted On:   Thursday, April 15, 2004 04:39 AM

Create a thread monitor class which is responsible for spawning all new instances of your thread classes. If the maximum threshold has been reached then it refuses to allow a new instance to be spawned.

Regards.
About | Sitemap | Contact