2 ms·
Cool! Having gone through this pain last weekend, I’m a bit wary of examples that are roughly stateless (or at least only do copying between channels). To all
by boulos 8y ago
Cool!
Having gone through this pain last weekend, I’m a bit wary of examples that are roughly stateless (or at least only do copying between channels). To all rust folks making samples: if you can mix in even a bit of mutable shared state (like a counter, logging, etc.), it goes a long way to showing whether your system can handle scoped threads/tasks, shared state, and straightforward concurrency ergonomically.
If you compare and contrast the docs for crossbeam’s scoped threads, Rayon’s scope, and an attempt at DIY via raw thread::spawn, I think you want to see the same clarity on the future/async/await side. Richer examples can really elucidate the pros and cons of different paths.
- yoshuaw 8y agoThanks for the feedback! -- what you're saying makes a lot of sense. I'll mull for a bit on how to add more stateful examples, but agree they might be quite helpful.