Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ChannelImp<T>

See the Channel interface for more details.

Type parameters

  • T

Hierarchy

  • ChannelImp

Implements

Index

Constructors

constructor

Properties

__computed

__computed: function[]

Methods

__@asyncIterator

  • __@asyncIterator(): AsyncIterableIterator<T>

areThereMessages

  • areThereMessages(): boolean

drain

  • drain(): Promise<T[]>
  • Some data streams inserted into a channel are asynchronous for example those coming from operators like fromAsyncIterable, fromAsyncIterableDelayed, pipe, and those coming from static utilities like merge and mergeDelayed.

    If values were inserted using above mentioned functions and, subsequently, the drain method is called, we have to see those values into the channel.

    The solution is to defer the drain method into a subsequent microtask with the lowest priority due to the setTimeout behaviour.

    Returns Promise<T[]>

fulfillTheRacer

  • fulfillTheRacer(racer: function): void

isThereAPendingRacer

  • isThereAPendingRacer(): boolean

isThereAlreadyAPendingPutter

  • isThereAlreadyAPendingPutter(): boolean

isThereAlreadyAPendingTaker

  • isThereAlreadyAPendingTaker(): boolean

prependMessage

  • prependMessage(msg: T): void

put

  • put(msg: T): Promise<void>

race

retrieveOldestMessage

  • retrieveOldestMessage(): T

retrieveOldestRacer

  • retrieveOldestRacer(): function

retrieveOldestTaker

  • retrieveOldestTaker(): function

take

  • take(): Promise<T>

unwaitOldestPutter

  • unwaitOldestPutter(): void

waitAPutter

  • waitAPutter(resolve: function): void
  • Parameters

    • resolve: function
        • (msg: T): void
        • Parameters

          • msg: T

          Returns void

    Returns void

waitATakerOrARacer

  • waitATakerOrARacer(resolve: function): void
  • Parameters

    • resolve: function
        • (): void
        • Returns void

    Returns void

waitTheChannel

  • waitTheChannel(resolve: function): void

Generated using TypeDoc