gpars.scheduler
[Java] Class ResizeableFJPool
java.lang.Object
gpars.scheduler.FJPool
gpars.scheduler.ResizeableFJPool
public final class ResizeableFJPool
extends FJPool
Represents the actors' thread pool, which performs tasks on behalf of the actors. Uses a ForkJoinPool from JSR-166y
The actors' thread pool size defaults to the n + 1, where n is the number of processors/cores available on the machine.
The VM parameter -Dgpars.poolsize can be used the configure the default size of the actors' thread pool.
The resize() and resetDefaultSize() methods can be used to configure size of the thread pool at runtime.
- Authors:
- Vaclav Pech
Date: Feb 27, 2009
Constructor Summary |
ResizeableFJPool()
Creates the pool with default number of threads.
|
ResizeableFJPool(int poolSize)
Creates the pool with specified number of threads.
|
Method Summary |
void
|
execute(Runnable task)
schedules a new task for processing with the pool
|
ResizeableFJPool
public ResizeableFJPool()
- Creates the pool with default number of threads.
ResizeableFJPool
public ResizeableFJPool(int poolSize)
- Creates the pool with specified number of threads.
- Parameters:
poolSize
- The required size of the pool
execute
@Override
public void execute(Runnable task)
- schedules a new task for processing with the pool
- Parameters:
task
- The task to schedule
Groovy Documentation