Execution

object Execution

Special ExecutionContext instances.

class Object
trait Matchable
class Any

Value members

Concrete fields

val directec: ExecutionContext

Execute Runnables directly on the current thread, using a stack frame.

Execute Runnables directly on the current thread, using a stack frame.

This is not safe to use for recursive function calls as you will ultimately encounter a stack overflow. For those situations, use trampoline.

val trampoline: ExecutionContext

A trampolining ExecutionContext

A trampolining ExecutionContext

This ExecutionContext is run thread locally to avoid context switches. Because this is a thread local executor, if there is a dependence between the submitted Runnables and the thread becomes blocked, there will be a deadlock.