Make map respect backpressure.

This commit is contained in:
David Braun 2019-03-20 09:50:51 -04:00
parent 3e92604d18
commit bf7258de05
No known key found for this signature in database
GPG key ID: 87EC41ADF710B7E2

View file

@ -200,9 +200,9 @@ const Channel = function(length = 0) {
const output = Channel(length);
(async () => {
await readOnly.forEach(value => {
output.push(callbackfn.call(thisArg, value));
});
await readOnly.forEach(value =>
output.push(callbackfn.call(thisArg, value))
);
output.close();
})();