Stop map
from returning buffered channels.
This commit is contained in:
parent
b426d67411
commit
3d17e23338
2 changed files with 2 additions and 3 deletions
|
@ -197,14 +197,14 @@ const Channel = function(length = 0) {
|
|||
},
|
||||
|
||||
map: (callbackfn, thisArg) => {
|
||||
const output = Channel(length);
|
||||
const output = Channel();
|
||||
|
||||
(async () => {
|
||||
await readOnly.forEach(value =>
|
||||
output.push(callbackfn.call(thisArg, value))
|
||||
);
|
||||
|
||||
output.close();
|
||||
await output.close();
|
||||
})();
|
||||
|
||||
return output;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue