Packages

object TrampolineExecutionContext

Source
TrampolineExecutionContext.scala
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. TrampolineExecutionContext
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. def apply(underlying: ExecutionContext): TrampolineExecutionContext

    Builds a TrampolineExecutionContext instance.

    Builds a TrampolineExecutionContext instance.

    underlying

    is the ExecutionContext to which the it defers to in case asynchronous or time-delayed execution is needed

  2. val immediate: TrampolineExecutionContext

    TrampolineExecutionContext instance that executes everything immediately, on the current thread.

    TrampolineExecutionContext instance that executes everything immediately, on the current thread.

    Implementation notes:

    • if too many blocking operations are chained, at some point the implementation will trigger a stack overflow error
    • reportError re-throws the exception in the hope that it will get caught and reported by the underlying thread-pool, because there's nowhere it could report that error safely (i.e. System.err might be routed to /dev/null and we'd have no way to override it)