scala.actors

trait IScheduler

[source: scala/actors/IScheduler.scala]

trait IScheduler
extends AnyRef
The IScheduler trait provides a common interface for all schedulers used to execute actor tasks. Subclasses of Actor that override its scheduler member must provide an IScheduler implementation.
Author
Philipp Haller
Direct Known Subclasses:
ActorGC, SchedulerAdapter, DelegatingScheduler, ExecutorScheduler, ForkJoinScheduler, SingleThreadedEventLoopScheduler, SingleThreadedScheduler, TerminationService

Method Summary
abstract def execute (task : java.lang.Runnable) : Unit
Submits a Runnable for execution.
abstract def execute (fun : => Unit) : Unit
Submits a closure for execution.
def executeFromActor (task : java.lang.Runnable) : Unit
abstract def isActive : Boolean
When the scheduler is active, it can execute tasks.
abstract def managedBlock (blocker : ManagedBlocker) : Unit
abstract def newActor (a : Reactor) : Unit
Registers a newly created actor with this scheduler.
abstract def onTerminate (a : Reactor)(f : => Unit) : Unit
Registers a closure to be executed when the specified actor terminates.
abstract def shutdown : Unit
Shuts down the scheduler.
abstract def terminated (a : Reactor) : Unit
Unregisters an actor from this scheduler, because it has terminated.
Methods inherited from AnyRef
getClass, hashCode, equals, clone, toString, notify, notifyAll, wait, wait, wait, finalize, ==, !=, eq, ne, synchronized
Methods inherited from Any
==, !=, isInstanceOf, asInstanceOf
Method Details
abstract def execute(fun : => Unit) : Unit
Submits a closure for execution.
Parameters
fun - the closure to be executed

abstract def execute(task : java.lang.Runnable) : Unit
Submits a Runnable for execution.
Parameters
task - the task to be executed

def executeFromActor(task : java.lang.Runnable) : Unit

abstract def shutdown : Unit
Shuts down the scheduler.

abstract def isActive : Boolean
When the scheduler is active, it can execute tasks.

abstract def newActor(a : Reactor) : Unit
Registers a newly created actor with this scheduler.
Parameters
a - the actor to be registered

abstract def terminated(a : Reactor) : Unit
Unregisters an actor from this scheduler, because it has terminated.
Parameters
a - the actor to be registered

abstract def onTerminate(a : Reactor)(f : => Unit) : Unit
Registers a closure to be executed when the specified actor terminates.
Parameters
a - the actor
f - the closure to be registered

abstract def managedBlock(blocker : ManagedBlocker) : Unit