<commit_before>    module.exports =




## Awaiter

An abstract **awaiter** is a participant in synchronized communications via
**channels**. An awaiter is, or is an indirection to, a **logical process**.
As such, a concrete `Awaiter` is either:

- an actual [`Process`][]

- a [`Callback`][] object, which wraps a function in an awaiter interface, as
  used by the operations [`send.async`][] and [`receive.async`][].

- an [`Operation`][] candidate, declared as part of a [`select`][] expression,
  that defines a potential channel operation to be performed on behalf of a
  specific [`Process`][]

Awaiters communicate exclusively by `send`ing or `receive`ing data over a
[`Channel`][]. A channel may synchronize communications between awaiters, if
necessary, by [`detain`][]ing an awaiter until the channel can perform the
communication, at which time the channel will [`dispatch`][] the detained
awaiter, allowing it to `proceed`.

    class Awaiter


### Constructor

      constructor: ->

Reference to the detaining [`Channel`][] on which an awaiter is blocked.

        @awaitee = null

Doubly-linked list references that implement a [`Channel`][]’s **await queue**.

        @_prev = null
        @_next = null

“Registers” from/to which data is read/written between channel operations.

`value` is either the *read source* from a **sender** or the *write target* for
a **receiver**.

`isFinal` is a boolean that conveys channel state at the time of an operation:
for a [`send`][] operation this tells whether the channel is **closed**; for a
[`receive`][] operation this tells whether the channel is **done**.

        @value   = undefined
        @isFinal = no




### Methods

      block: (@awaitee, @value) ->

      proceed: (value, isFinal) ->

      register: (value, isFinal) ->
        @isFinal = isFinal
        @value = value





[`Process`]: process.coffee.md
[`Channel`]: channel.coffee.md
[`Callback`]: callback.coffee.md
[`send.async`]: index.coffee.md#sendasync
[`receive.async`]: index.coffee.md#receiveasync
[`Operation`]: operation.coffee.md
[`select`]: selector.coffee.md#select
[`send`]: index.coffee.md#send
[`receive`]: index.coffee.md#receive
[`detain`]: channel.coffee.md#detain
[`dispatch`]: channel.coffee.md#dispatch
<commit_msg>fix commentdocs<commit_after>    module.exports =




## Awaiter

An abstract **awaiter** is a participant in synchronized communications via
**channels**. An awaiter is, or is an indirection to, a **logical process**.
As such, a concrete `Awaiter` is either:

- an actual [`Process`][]

- a [`Callback`][] object, which wraps a function in an awaiter interface, as
  used by the operations [`send.async`][] and [`receive.async`][].

- an [`Operation`][] candidate, declared as part of a [`select`][] expression,
  that defines a potential channel operation to be performed on behalf of a
  specific [`Process`][]

Awaiters communicate exclusively by `send`ing or `receive`ing data over a
[`Channel`][]. A channel may synchronize communications between awaiters, if
necessary, by [`detain`][]ing an awaiter until the channel can perform the
communication, at which time the channel will [`dispatch`][] the detained
awaiter, allowing it to `proceed`.

    class Awaiter


### Constructor

      constructor: ->

Reference to the detaining [`Channel`][] or [`Selector`][] on which an awaiter
is blocked.

        @awaitee = null

Doubly-linked list references that implement a [`Channel`][]’s **await queue**.

        @_prev = null
        @_next = null

“Registers” from/to which data is read/written between channel operations.

`value` is either the *read source* from a **sender** or the *write target* for
a **receiver**.

`isFinal` is a boolean that conveys channel state at the time of an operation:
for a [`send`][] operation this tells whether the channel is **closed**; for a
[`receive`][] operation this tells whether the channel is **done**.

        @value   = undefined
        @isFinal = no




### Methods

      block: (@awaitee, @value) ->

      proceed: (value, isFinal) ->

      register: (value, isFinal) ->
        @isFinal = isFinal
        @value = value





[`Process`]: process.coffee.md
[`Channel`]: channel.coffee.md
[`Selector`]: selector.coffee.md
[`Callback`]: callback.coffee.md
[`send.async`]: index.coffee.md#sendasync
[`receive.async`]: index.coffee.md#receiveasync
[`Operation`]: operation.coffee.md
[`select`]: selector.coffee.md#select
[`send`]: index.coffee.md#send
[`receive`]: index.coffee.md#receive
[`detain`]: channel.coffee.md#detain
[`dispatch`]: channel.coffee.md#dispatch

{'fraction_non_alphanumeric': 0.1348290132868656, 'fraction_numerical': 0.0, 'mean_word_length': 4.079646017699115, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4893342', 'n_tokens_mistral': 1439, 'n_tokens_neox': 1361, 'n_words': 515}