4 ms·
I'm not familiar with the way rust is going, but in general Async can be implemented purely a compile time by turning an async function into a set of functions
by gpderetta 8y ago
I'm not familiar with the way rust is going, but in general Async can be implemented purely a compile time by turning an async function into a set of functions tail calling each other or a switch statement. The stack frame need to go somewhere, but with allocator support this does not need to be exclusively handled by the runtime.
- nine_k 8y agoThis is likely doable if no I/O is involved in the scheduling of coroutines. Usually it is.
- gpderetta 8y agoThat's completely orthogonal though.
- steveklabnik 8y agoAsync/await is basically sugar for generators and futures.