jamod at SF

net.wimpi.modbus.util
Class ThreadPool

java.lang.Object
  extended bynet.wimpi.modbus.util.ThreadPool

public class ThreadPool
extends java.lang.Object

Class implementing a simple thread pool.

Version:
1.2rc1 (09/11/2004)
Author:
Dieter Wimberger

Constructor Summary
ThreadPool(int size)
          Constructs a new ThreadPool instance.
 
Method Summary
 void execute(java.lang.Runnable task)
          Execute the Runnable instance through a thread in this ThreadPool.
protected  void initPool()
          Initializes the pool, populating it with n started threads.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ThreadPool

public ThreadPool(int size)
Constructs a new ThreadPool instance.

Parameters:
size - the size of the thread pool.
Method Detail

execute

public void execute(java.lang.Runnable task)
Execute the Runnable instance through a thread in this ThreadPool.

Parameters:
task - the Runnable to be executed.

initPool

protected void initPool()
Initializes the pool, populating it with n started threads.


jamod at SF

Copyright © 2002-2004 jamod development team.