Add missing docs for sequential mode

main
Sven Slootweg 6 months ago
parent bb1c8a3d07
commit 0627504995

@ -43,6 +43,7 @@ Note that using lanes is __optional__; all options and functions default to lane
- __mode:__ *Default: `"pull"`.* The mode to operate in. One of `"push"`, `"pull"`.
- __lanes__ *Default: `1`.* The amount of lanes to create. Each lane is an independent queue of values and errors, though broadcasts are possible.
- __pull:__ *Required only in pull mode.* An (`async`) callback that's called to acquire a new value/result, and which is expected to return a Promise. This should be providing your values in pull mode.
- __sequential:__ *Default: `false`. Only used in pull mode.* Whether to handle requests sequentially; that is, a second pull will not be started until the previous pull has completed, even if a second request is made.
- __select:__ *Default: `0`.* A callback that receives a value, and returns the index of the lane to assign it to (or an array of such indexes). The callback may return a Promise.
- __selectError:__ *Default: `0`.* Like `select`, but it receives errors instead of values.
- __broadcastValues:__ *Default: `false`.* Whether to broadcast all values to all lanes by default. The `select` callback will not be called for broadcast values. In push mode, this can be overridden for individual values.

@ -1,6 +1,6 @@
{
"name": "push-buffer",
"version": "1.1.0",
"version": "1.1.1",
"description": "Abstraction for converting between push/pull APIs, and managing asynchronous value distribution",
"main": "index.js",
"files": [

Loading…
Cancel
Save