3 ms·
I don't see any callbacks here, which is nice, but doesn't really fit the Node execution model. Do the commands block? Are they queued and executed asynchronous
by ZitchDog 15y ago
I don't see any callbacks here, which is nice, but doesn't really fit the Node execution model. Do the commands block? Are they queued and executed asynchronously?
- darklajid 15y agoThe documentation explicitly says that every call is blocking unless stated otherwise.
- ZitchDog 15y agoI see that now, thanks. I did a quick scan of the doc and didn't see it as it's a little buried.
- arturadib 15y agoI agree that async APIs are almost mandatory in the context of servers (since you don't want to block them while you run I/O commands). But for shell scripts, not so much. In fact, async would just introduce unnecessary complexity, in particular a nested callback hell as most shell scripts are basically sequences of I/O commands (promises, etc would mitigate the problem somewhat, but again at the expense of another layer of complexity). That being said... if there's enough demand to use these commands within web servers, adding callback support should be easy. Contributions are welcome! :)