final
class
TrampolineExecutionContext extends ExecutionContext
Value Members
-
-
final
def
!=(arg0: Any): Boolean
-
final
def
##(): Int
-
-
final
def
==(arg0: Any): Boolean
-
final
def
asInstanceOf[T0]: T0
-
def
clone(): AnyRef
-
-
-
def
execute(runnable: Runnable): Unit
-
def
finalize(): Unit
-
final
def
getClass(): Class[_]
-
def
hashCode(): Int
-
final
def
isInstanceOf[T0]: Boolean
-
-
final
def
notify(): Unit
-
final
def
notifyAll(): Unit
-
-
def
reportFailure(t: Throwable): Unit
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
-
def
toString(): String
-
final
def
wait(): Unit
-
final
def
wait(arg0: Long, arg1: Int): Unit
-
final
def
wait(arg0: Long): Unit
A
scala.concurrentExecutionContext
implementation that executes runnables immediately, on the current thread, by means of a trampoline implementation.Can be used in some cases to keep the asynchronous execution on the current thread, as an optimization, but be warned, you have to know what you're doing.
The
TrampolineExecutionContext
keeps a reference to anotherunderlying
context, to which it defers for:Deferring the rest of the queue happens:
underlying
contextblocking
context, the rest of the tasks get re-scheduled for execution on theunderlying
context to prevent any deadlocksThus this implementation is compatible with the
scala.concurrent.BlockContext
, detectingblocking
blocks and reacting by forking the rest of the queue to prevent deadlocks.