Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## php.java.bridge
Class BaseThreadPool

    java.lang.Object
      php.java.bridge.BaseThreadPool

Direct Known Subclasses:
  ThreadPool

    public class BaseThreadPool

extends java.lang.Object

A standard thread pool, accepts runnables and runs them in a thread environment. Example:
`ThreadPool pool = new ThreadPool("MyThreadPool", 20);
pool.start(new YourRunnable());
`

Constructor Summary
`BaseThreadPool(java.lang.String name, int poolMaxSize)` Creates a new thread pool.
`BaseThreadPool(java.lang.String name, int poolMaxSize, java.lang.ClassLoader loader)` Creates a new thread pool.

Method Summary
`void` | `start(java.lang.Runnable r)` Push a runnable to the list of runnables.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### BaseThreadPool

    public BaseThreadPool(java.lang.String name,
                          int poolMaxSize)

  Creates a new thread pool.

  Parameters:
    `name` - - The name of the pool threads.
    `poolMaxSize` - - The max. number of threads, must be >= 1.

### BaseThreadPool

    public BaseThreadPool(java.lang.String name,
                          int poolMaxSize,
                          java.lang.ClassLoader loader)

  Creates a new thread pool.

  Parameters:
    `name` - The name of the pool threads.
    `poolMaxSize` - The max. number of threads, must be >= 1.
    `loader` - The class loader, may be null.

Method Detail

### start

    public void start(java.lang.Runnable r)

  Push a runnable to the list of runnables. The notify will fail if all threads are busy. Since the pool contains at least one thread, it will pull the runnable off the list when it becomes available.

  Parameters:
    `r` - - The runnable

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD