How can I control No. of Threads to access a method out of many running threads?
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   SHAILESH_JADHAV
Posted On:   Monday, December 15, 2003 01:34 AM

I want to control No. of threads those should access method. (Presently 1000 threads are running. But I Want only 3 Threads access a method(). Is it Possible?)

Re: How can I control No. of Threads to access a method out of many running threads?

Posted By:   Edward_Harned  
Posted On:   Monday, December 15, 2003 08:17 AM

You need what is known as a Semaphore.


See Doug Lee's concurrent package at
href="http://gee.cs.oswego.edu/dl/classes/EDU/oswego/cs/dl/util/concurrent/intro.html">http://gee.cs.oswego.edu/dl/classes/EDU/oswego/cs/dl/util/concurrent/intro.html

About | Sitemap | Contact