Re:Show HN: Ts-Chan – Go-Like Concurrency Primitives for Typ...
by pineapple_guy on Sunday November 05, 2023 @11:59PM
(#38159038)
Regarding the first example in the readme; where is the result variable declared?
[ Parent
| on HN ]
Re:Show HN: Ts-Chan – Go-Like Concurrency Primitives for Typ...
by joeycumines on Monday November 06, 2023 @12:09AM
(#38159090)
Ah, that example is demonstrating an internal mechanism used to ensure the high-level asynchronous API calls take at least one tick of the event loop to complete.
There is no `result` variable - I was just attempting to convey that "some async stuff happens, then it waits if we can't verify that it's not the same tick as when the call started". The "async stuff", in the actual implementation, is sending or receiving.