Thread Question

Hi, Can anybody suggest how to write a thread program, in which at any point of time a method can be executed by 3 threads. If more 3 threads come then those should be wait.Thanks in advance
[211 byte] By [suman_tejaa] at [2007-11-26 20:14:53]
# 1
You're describing a classic thread pool... google that... don't roll your own.
corlettka at 2007-7-9 23:21:20 > top of Java-index,Java Essentials,New To Java...
# 2
Thread pools are discussed in the tutorial: http://java.sun.com/docs/books/tutorial/essential/concurrency/index.html
DrLaszloJamfa at 2007-7-9 23:21:20 > top of Java-index,Java Essentials,New To Java...