ibis.util
Class ThreadPool

java.lang.Object
  extended byibis.util.ThreadPool

public final class ThreadPool
extends java.lang.Object

Author:
Niels Drost Threadpool which uses timeouts to determine the number of threads... There is no maximum number of threads in this pool, to prevent deadlocks.

Method Summary
static void createNew(java.lang.Runnable runnable, java.lang.String name)
          Associates a thread from the ThreadPool with the specified Runnable.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

createNew

public static void createNew(java.lang.Runnable runnable,
                             java.lang.String name)
Associates a thread from the ThreadPool with the specified Runnable. If no thread is available, a new one is created. When the Runnable is finished, the thread is added to the pool of available threads.

Parameters:
runnable - the Runnable to be executed.
name - set the thread name for the duration of this run


The Ibis project