Show:
Constructor
new TokenAccumulator(manager, parentCB)
...
Parameters:
Name | Type | Description |
---|---|---|
manager |
TokenTransformManager | |
parentCB |
function | The callback to call after we've finished accumulating. |
Methods
_callParentCB() → {function}
...
append(tokens)
Append tokens to an accumulator.
concatTokens(tokens)
Concatenates an array of tokens to the tokens kept in siblingChunks.
Concatenates an array of tokens to the tokens kept in siblingChunks. If the ranks are the same, just concat to the last chunk. If not, set apart as its own chunk.
Parameters:
Name | Type | Description |
---|---|---|
tokens |
Array |
emitTokens(async)
Sends all accumulated tokens in order.
Sends all accumulated tokens in order.
Parameters:
Name | Type | Description |
---|---|---|
async |
boolean |
push(token)
Push a token into the accumulator.
receiveToksFromChild(ret) → {function|null
}
Receives tokens from a child accum/pipeline/cb.
receiveToksFromSibling(ret) → {function|null
}
Receives tokens from a sibling accum/cb.
siblingDone()
Mark the sibling as done (normally at the tail of a chain).
Mark the sibling as done (normally at the tail of a chain).