4 ms·
I kind of disagree with the article's premise - that the fact that Go uses async/await like Js and C#, but presents them as green threads is a good thing. Imo
by torginus 5y ago
I kind of disagree with the article's premise - that the fact that Go uses async/await like Js and C#, but presents them as green threads is a good thing.
Imo it creates false expectations in programmers, who are surprised, that long-running compute code doesn't get preempted, since the compiler doesn't insert preemption points.
It also robs us of the possibility, of writing event-driven UI applications, where one can make an asynchronous call on the UI thread safely, which will get marshalled back to the UI thread.
- nasretdinov 5y agoBy the way, Go does have async preemption. It didn't have it in version 1.0, but it does now. https://medium.com/a-journey-with-go/go-asynchronous-preemption-b5194227371c https://medium.com/a-journey-with-go/go-asynchronous-preempt...