|
|
|
|
|
by KingOfCoders
1657 days ago
|
|
I understood from the OP that in Golang the sync and async code would be the same - contrary to e.g. Rust were you have async/wait. Go achieves this with coroutines and the go keyword. f() is a sync call to the function f, and the function f used async calls inside. Somewhere then needs to be a transition from async to sync contexts (aka wait/block). I wondered where this happens. From your comment I assume there is a difference, in sync code I would do x = f() while in async code I would use f(channel) ? |
|