3 ms·
C++ coroutines are incomplete without a an executor to run them on. Unlike C# you can't just sprinkle in async and await keywords and let the background thread
by nly 4y ago
C++ coroutines are incomplete without a an executor to run them on.
Unlike C# you can't just sprinkle in async and await keywords and let the background thread pool take care of it...and doing so would be undesirable, given the lack of thread safe garbage collection.
Boost.Fiber on the other hand pretty damn cool.
- steveklabnik 4y agoThe exact same thing is true of Rust.
- hedora 4y agoThat is a feature of coroutines, not a bug. I’ve written executors in multiple languages. For production code, it is usually easier than reusing some complicated thing that is a poor fit but does nothing well.