const classafConcurrent::WorkerPool

sys::Obj
  afConcurrent::WorkerPool

Lets you perform concurrent units of work.

make

Source

new make(Int maxWorkers, Str name := "WorkerPool")

Create a new WorkerPool with the given number of workers.

name

Source

Str name()

Name used by pool and associated threads.

numWorkers

Source

Int numWorkers

Max number of threads used by this pool for concurrent actor execution.

May be updated.

pool

Source

ActorPool pool()

The wrapped ActorPool.

work

Source

Future work(|->Obj? f)

Runs the given func asynchronously.

The given func and return value must be immutable.

workLater

Source

Future workLater(Duration d, |->Obj? f)

Runs the given func asynchronously, after the given duration has elapsed.

The given func and return value must be immutable.