4 ms·
Promisifying makes the node APIs more convenient, but you still do not have the ability to provide back-pressure. See the link below: https://deno.land/v1#prom
by nitsky 6y ago
Promisifying makes the node APIs more convenient, but you still do not have the ability to provide back-pressure. See the link below:
https://deno.land/v1#promises-all-the-way-down https://deno.land/v1#promises-all-the-way-down
- truth_seeker 6y agoThere are definitely few things which are done in different way in Deno as part of re-design. But that does not mean NodeJS does not take care of it or at least provide the some API to tackle that issue. In this case, Stream interface API in NodeJS are the solution to the problem. They help you build layer over native EventEmitter interface or rather strictly speaking they help extend it. This links might be helpful for you. Backpressuring in Streams - https://nodejs.org/es/docs/guides/backpressuring-in-streams/ https://nodejs.org/es/docs/guides/backpressuring-in-streams/ Official Docs on Stream API - https://github.com/nodejs/node/blob/master/doc/api/stream.md https://github.com/nodejs/node/blob/master/doc/api/stream.md Note that HTTP server in NodeJS already implements it.