Scala Library
|
|
class
ResizableThreadPoolScheduler(protected val
terminate : Boolean, protected val
daemon : Boolean)
extends
java.lang.Thread with
IScheduler with
TerminationMonitorThreadPoolExecutor
to execute Actor
s.
The scheduler attempts to shut down itself and the underlying
ThreadPoolExecutor
only if terminate
is set to true. Otherwise, the scheduler must be shut down
explicitly.Additional Constructor Summary | |
def
|
this : ResizableThreadPoolScheduler |
def
|
this (d : Boolean) : ResizableThreadPoolScheduler |
Value Summary | |
protected val
|
CHECK_FREQ : Int |
Values and Variables inherited from TerminationMonitor | |
activeActors, terminationHandlers |
Method Summary | |
def
|
execute
(fun : => Unit) : Unit
Submits a closure for execution.
|
def
|
execute
(task : java.lang.Runnable) : Unit
Submits a
Runnable for execution. |
def
|
isActive
: Boolean
When the scheduler is active, it can execute tasks.
|
def
|
managedBlock (blocker : ManagedBlocker) : Unit |
def
|
restart
: Unit
Resumes the execution of the scheduler if it was previously
suspended using
snapshot . |
override def
|
run : Unit |
def
|
shutdown
: Unit
Shuts down the scheduler.
|
def
|
snapshot
: Unit
Suspends the scheduler. All threads that were in use by the
scheduler and its internal thread pool are terminated.
|
Methods inherited from TerminationMonitor | |
newActor, onTerminate, terminated, allTerminated, gc |
Methods inherited from IScheduler | |
executeFromActor, tick, onLockup, onLockup, printActorDump |
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
run : Unit
def
execute(task : java.lang.Runnable) : Unit
Runnable
for execution.task -
the task to be executedfun -
the closure to be executed
def
shutdown : Unit
def
isActive : Boolean
def
managedBlock(blocker : ManagedBlocker) : Unit
def
snapshot : Unit
def
restart : Unit
snapshot
.
Scala Library
|
|