module Async
Classes and Modules
class BarrierA general purpose synchronisation primitive, which allows one task to wait for a number of other tasks to complete. It can be used in conjunction with
class Async::Semaphore.class Cancel < ExceptionRaised when a task is explicitly cancelled.
class ClockA convenient wrapper around the internal monotonic clock.
class ConditionA synchronization primitive, which allows fibers to wait until a particular condition is (edge) triggered.
module ConsoleShims for the console gem, redirecting warnings and above to
Kernel#warn.class DeadlineRepresents a deadline timeout with decrementing remaining time. Includes an efficient representation for zero (non-blocking) timeouts.
class TimeoutError < StandardErrorRaised if a timeout occurs on a specific Fiber. Handled gracefully by
Task.module ForkHandlerPrivate module that hooks into Process._fork to handle fork events.
class IdlerA load balancing mechanism that can be used process work when the system is idle.
class LimitedQueue < QueueA thread-safe queue which limits the number of items that can be enqueued.
class ListA general doublely linked list. This is used internally by
class Async::Barrierandclass Async::Conditionto manage child tasks.class Children < ListA list of children tasks.
class NodeA node in a tree, used for implementing the task hierarchy.
class Notification < ConditionA synchronization primitive, which allows fibers to wait until a notification is received. Does not block the task which signals the notification. Waiting tasks are resumed on next iteration of the reactor.
class PriorityQueueA queue which allows items to be processed in priority order of consumers.
class PromiseA promise represents a value that will be available in the future. Unlike Condition, once resolved (or rejected), all future waits return immediately with the stored value or raise the stored exception.
class QueueA thread-safe queue which allows items to be processed in order.
class Reactor < SchedulerA wrapper around the the scheduler which binds it to the current thread automatically.
class Scheduler < NodeHandles scheduling of fibers. Implements the fiber scheduler interface.
class SemaphoreA synchronization primitive, which limits access to a given resource.
class Task < NodeRepresents a sequential unit of work, defined by a block, which is executed concurrently with other tasks. A task can be in one of the following states:
initialized,running,completed,failed, orcancelled.class TimeoutRepresents a flexible timeout that can be rescheduled or extended.
class VariableA synchronization primitive that allows one task to wait for another task to resolve a value.
class WaiterA composable synchronization primitive, which allows one task to wait for a number of other tasks to complete. It can be used in conjunction with
class Async::Semaphoreand/orclass Async::Barrier.