2 ms·
Disclaimer: not a language designer/implementer (yet). Couldn't segmented stacks for async/await-style IO be simulated by swapping the stack out at every await
by mattgreenrocks 13y ago
Disclaimer: not a language designer/implementer (yet).
Couldn't segmented stacks for async/await-style IO be simulated by swapping the stack out at every await? I mean copying out the registers and the raw stack to some heap location, then restoring them by reversing the process later.
(One problem I see is that it'd be slow when lots of IO operations are involved.)
- pcwalton 13y agoDoesn't work if threads can have pointers into each other's stacks (which we'd like to support someday for fork/join parallelism).