zlacker

[parent] [thread] 2 comments
1. gpdere+(OP)[view] [source] 2024-01-20 18:11:47
That's a bit of nonsense. As far as I know, all functions are sync in go. The fact that they are implemented async in the runtime with an user-space scheduler is irrelevant (you could otherwise make the point that there are truly no sync functions).

If we call the go programming model async, the word has completely lost all meanings.

replies(1): >>SkiFir+9A
2. SkiFir+9A[view] [source] 2024-01-20 21:45:03
>>gpdere+(OP)
What is the difference between a sync and an async function for you then?
replies(1): >>gpdere+J41
◧◩
3. gpdere+J41[view] [source] [discussion] 2024-01-21 01:43:06
>>SkiFir+9A
An async function is on CPS form and return it's result via a return continuation. Typically when invoked from a non CPS function it also forks the thread of execution.

These days async functions are also typically lazily evaluated via partial evaluation and the return continuation is not necessarily provided at the call site.

A sync function provides it's result via the normal return path.

[go to top]