suyanhanx commented on code in PR #3619:
URL:
https://github.com/apache/incubator-opendal/pull/3619#discussion_r1405839922
##########
bindings/nodejs/index.js:
##########
@@ -19,9 +19,59 @@
/// <reference types="node" />
+const { Writable, Readable } = require('node:stream')
+
+class ReaderStream extends Readable {
Review Comment:
Maybe you could take this as a reference.
https://nodejs.org/en/docs/guides/event-loop-timers-and-nexttick
The nodejs only has one main thread. So it takes the event loop as its async
model. Every task is executed one by one.
Although we are calling readerSync, it's non-blocking through the event
loop. The timing of the call is scheduled by the runtime.
Calling an async API would not change this model. And calling async API will
get extra cost.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]