Executor

zio.Executor
See theExecutor companion object
abstract class Executor

An executor is responsible for executing actions. Each action is guaranteed to begin execution on a fresh stack frame.

Attributes

Companion
object
Source
Executor.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Value members

Abstract methods

def metrics(implicit unsafe: Unsafe): Option[ExecutionMetrics]

Current sampled execution metrics, if available.

Current sampled execution metrics, if available.

Attributes

Source
Executor.scala
def submit(runnable: Runnable)(implicit unsafe: Unsafe): Boolean

Submits an effect for execution.

Submits an effect for execution.

Attributes

Source
Executor.scala

Concrete methods

Views this Executor as a Scala ExecutionContext.

Views this Executor as a Scala ExecutionContext.

Attributes

Source
Executor.scala
def asJava: Executor

Views this Executor as a Java Executor.

Views this Executor as a Java Executor.

Attributes

Source
Executor.scala
def submitAndYield(runnable: Runnable)(implicit unsafe: Unsafe): Boolean

Submits an effect for execution and signals that the current fiber is ready to yield.

Submits an effect for execution and signals that the current fiber is ready to yield.

'''NOTE''': The implementation of this method in the ZScheduler will attempt to run the runnable on the current thread if the current worker's queues are empty. This leads to improved performance as we avoid unnecessary parking/un-parking of threads.

Attributes

Source
Executor.scala
final def submitAndYieldOrThrow(runnable: Runnable)(implicit unsafe: Unsafe): Unit

Submits an effect for execution and signals that the current fiber is ready to yield or throws.

Submits an effect for execution and signals that the current fiber is ready to yield or throws.

Attributes

See also

submitAndYield for an explanation of the implementation in ZScheduler.

Source
Executor.scala
final def submitOrThrow(runnable: Runnable)(implicit unsafe: Unsafe): Unit

Submits an effect for execution or throws.

Submits an effect for execution or throws.

Attributes

Source
Executor.scala

Inherited fields

Views this Executor as a Scala ExecutionContextExecutorService.

Views this Executor as a Scala ExecutionContextExecutorService.

Attributes

Inherited from:
ExecutorPlatformSpecific (hidden)
Source
ExecutorPlatformSpecific.scala