3 ms·
Go has channels which are much more like fibers. Full threads of their own with actual stacks (which can be moved in Go). If C++ or Rust ever get coroutines th
by AlexanderDhoore 8y ago
Go has channels which are much more like fibers. Full threads of their own with actual stacks (which can be moved in Go).
If C++ or Rust ever get coroutines they will be more low-level. Just a control flow construct which compiles coroutines down to state machines. So it's concurrency, not parallelism. High performance for one thread, but less powerful conceptually.
Rust used to have segmented stacks, but they removed it because performance was unpredictable.
- tuukkah 8y agoRust seems to have stackless coroutines as an experimental language feature: https://doc.rust-lang.org/nightly/unstable-book/language-features/generators.html https://doc.rust-lang.org/nightly/unstable-book/language-fea...