Scala Library
|
|
class
ThreadPoolScheduler(protected val
executor : java.util.concurrent.ThreadPoolExecutor, protected val
terminate : Boolean)
extends
java.lang.Thread with
TerminationMonitor with
ExecutorSchedulerThreadPoolScheduler
class uses an
ThreadPoolExecutor
to execute Actor
s.
A ThreadPoolScheduler
attempts to shut down
the underlying ExecutorService
only if
terminate
is set to true.
Otherwise, the ExecutorService
must be shut down either
directly or by shutting down the
ThreadPoolScheduler
instance.Additional Constructor Summary | |
def
|
this : ThreadPoolScheduler |
Value Summary | |
protected val
|
CHECK_FREQ : Int |
Method Summary | |
def
|
execute
(fun : => Unit) : Unit
Submits a closure for execution.
|
override def
|
managedBlock (blocker : ManagedBlocker) : Unit |
override def
|
run : Unit |
def
|
shutdown
: Unit
Shuts down the scheduler.
|
Methods inherited from ExecutorScheduler | |
onShutdown, isActive |
Methods inherited from ThreadPoolRunner | |
submit, execute |
Methods inherited from TaskRunner | |
!!, tryCatch |
Methods inherited from IScheduler | |
executeFromActor |
Methods inherited from TerminationMonitor | |
newActor, onTerminate, terminated, allTerminated |
Methods inherited from AnyRef | |
getClass, hashCode, equals, clone, notify, notifyAll, wait, wait, wait, finalize, ==, !=, eq, ne, synchronized |
Methods inherited from Any | |
==, !=, isInstanceOf, asInstanceOf |
Additional Constructor Details |
Value Details |
Method Details |
override
def
managedBlock(blocker : ManagedBlocker) : Unit
override
def
run : Unit
fun -
the closure to be executed
def
shutdown : Unit
Scala Library
|
|