class

ForkJoin::ExecutionContext::Scheduler

Inherits Fiber::ExecutionContext::Scheduler < Reference < Object

Instance methods

enqueue(fiber : Fiber) : Nil

Suspends the current fiber and resumes fiber instead. The current fiber will never be resumed; you're responsible to reenqueue it.

Unsafe. Must only be called on ExecutionContext.current. Prefer ExecutionContext.enqueue instead.

Source
execution_context
Source
index
Source
main_fiber
Source
name
Source
reschedule

Suspends the execution of the current fiber and resumes the next runnable fiber.

Unsafe. Must only be called on ExecutionContext.current. Prefer ExecutionContext.reschedule instead.

Source
resume(fiber : Fiber) : Nil

Suspends the execution of the current fiber and resumes fiber.

The current fiber will never be resumed; you're responsible to reenqueue it.

Unsafe. Must only be called on ExecutionContext.current. Prefer ExecutionContext.resume instead.

Source
spawn(*, name : String | Nil = nil, &block : -> ) : Fiber

Instantiates a fiber and enqueues it into the scheduler's local queue.

Source
spawn(*, name : String | Nil = nil, same_thread : Bool, &block : -> ) : Fiber

Legacy support for the same_thread argument. Each execution context may decide to support it or not (e.g. a single threaded context can accept it).

Source
status

Returns the current status of the scheduler. For example "running", "event-loop" or "parked".

Source
thread
Source
thread=(thread : Thread)
Source
thread?
Source
work_deque
Source