Options
All
  • Public
  • Public/Protected
  • All
Menu

The Context under which IO is supposed to be executed.

This definition is of interest only when creating tasks with IO.asyncUnsafe, which exposes internals and is considered unsafe to use.

final

Hierarchy

  • IOContext

Index

Constructors

constructor

  • new IOContext(scheduler: Scheduler, connection?: StackedCancelable, options?: IOOptions): IOContext
  • Parameters

    • scheduler: Scheduler
    • Default value connection: StackedCancelable = new StackedCancelable()
    • Default value options: IOOptions = { autoCancelableRunLoops: false }

    Returns IOContext

Properties

connection

connection: StackedCancelable

Is the StackedCancelable that accumulates cancelable actions, to be triggered if cancellation happens.

options

options: IOOptions

Options passed to the run-loop implementation, determining its behavior. See IOOptions for the available options.

scheduler

scheduler: Scheduler

The Scheduler in charge of evaluating asynchronous boundaries on run.

Methods

markAsyncBoundary

  • markAsyncBoundary(): void
  • Resets the stored frameIndex.

    Calling this method inside the logic of a IO.asyncUnsafe lets the run-loop know that an async boundary happened. This works in tandem with the logic for ExecutionModel.batched(n), for better detection of synchronous cycles, to avoid introducing forced async boundaries where not needed.

    Returns void

shouldCancel

  • shouldCancel(): boolean
  • Returns true in case the run-loop should be canceled, but this can only happen if autoCancelableRunLoops is set to true.

    Returns boolean

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method

Generated using TypeDoc