Live data from Hacker News

Show HN: Async/await alternative

github.com

1–10 of 10 posts

Re: Show HN: Async/await alternative

#2
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).

Re: Show HN: Async/await alternative

#7
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.

Re: Show HN: Async/await alternative

#10
post #6
post #3

Looked at the deasync that this is based on, and it looks like they are trying to reinvent threads? Seems ironic to me.

Why do you think they are trying to reinvent threads? Looks to me like it is a basic nested event loop.

It pauses execution of a stack when it is blocked allowing other stacks to execute.