|
|
|
|
|
by the-lazy-guy
587 days ago
|
|
It's not about syntax. There is a huge difference in implementation and semantics between stackful coroutines (which go uses) and stackless coroutines (which most languages with async/await use). For all practical purposes goroutines behave as separate threads with blocking calls. The fact that they are multiplexed on a few system threads is an implementation detail. Otherwise you could say that using system threads directly is also asynchrnous programming. After all, your thread gets suspended on system calls (including synchronization primitives) and is resumed upon their completion. |
|
Semantically the biggest difference is that stackless coroutines typically require yield points to be marked syntactically in code.