top | item 45782802

(no title)

antihero | 4 months ago

Isn’t await often just sugar around the underlying implementation be that greenthreads, epoll, picoev, etc?

discuss

order

troupo|4 months ago

I think it depends on the language?

Javascript's async/await probably started as a sugar for callbacks (since JS is single-threaded). Many others definitely have that as sugar for whatever threading implementation they have. In C# it's sugar on top of the whole mechanism of structured concurrency.

But I'm mostly talking out of my ass here, since I don't know much about this topic, so everything above is hardly a step above speculation.