by vsviridov on 10/31/16, 8:39 AM
Node 7 is out with async/await behind the flag.
by zamalek on 10/31/16, 1:47 PM
// the stream has now been fully read, async in the background
What if the file is gigabytes in size?
by skybrian on 10/31/16, 12:56 PM
It's a nice trick but it's unsafe in general. JavaScript libraries usually assume single-threaded event handling. If you start up another event loop from a callback (while some other library's code is already on the stack), you'll probably break it.
by maxpert on 10/31/16, 4:12 AM
Well I hope NodeJS ultimately settles on such a syntax to preempt and resume automatically. I love Golang in this regard since it abstracts out everything using channels, and go-routines (not to compare multiple thread support).
by aaronhoffman on 10/31/16, 12:03 PM
by bbcbasic on 10/31/16, 6:30 AM
Looked at the deasync that this is based on, and it looks like they are trying to reinvent threads? Seems ironic to me.