3 ms·
Would it be possible to make a coroutine implementation that allows the stacks to grow dynamically? (If there are N coroutines, you will need N stacks, so for l
by amelius 12y ago
Would it be possible to make a coroutine implementation that allows the stacks to grow dynamically? (If there are N coroutines, you will need N stacks, so for large N it does not suffice to have a statically conservatively preallocated stack for each coroutine).
Also, how is Rust's support for coroutines?
- errordeveloper 12y agoI have recently found this: https://github.com/rustcc/coroutine-rs https://github.com/rustcc/coroutine-rs
- amelius 12y agoInteresting, but the documentation does not seem to describe how stacks/memory management is done.
- keeperofdakeys 12y agoFrom a quick look at the code, it seems to use segmented stacks with memory mapping. https://github.com/rustcc/coroutine-rs/blob/master/src/stack.rs https://github.com/rustcc/coroutine-rs/blob/master/src/stack...
- rumcajz 12y agoThere's -fsplit-stack option in gcc IIRC.