3 ms·
A simple pattern I follow for C++ concurrency is to have each thread run an event loop and use https://github.com/cameron314/concurrentqueue https://github.com/
by jcelerier 8y ago
A simple pattern I follow for C++ concurrency is to have each thread run an event loop and use https://github.com/cameron314/concurrentqueue https://github.com/cameron314/concurrentqueue as `concurrentqueue<std::function<void()>` for execution of code in the other thread ; I don't remember getting threading problems by doing like this as long as any shared resource either outlives both threads or is in a shared_ptr of sorts.
- mcguire 8y agoCan I interest you in some Pony? https://www.ponylang.org/ https://www.ponylang.org/
- mpartel 8y agoI found "The list of reference capabilities" at https://tutorial.ponylang.org/capabilities/reference-capabilities.html https://tutorial.ponylang.org/capabilities/reference-capabil... especially interesting to compare with Rust's borrow checker.