I am new to concurrent programming (closest I've done has been parallel programming using OpenMP). So I was wondering if there are any good examples or tutorials to learn different primitives in the newly released crossbeam crate.
- when it's best to use channels to share tasks/data between threads vs a global struct behind RwLock?
- can the new data structures (ArrayQue, SeqQue, Deque) be shared across threads without a mutex? If not what's the recommended way of synchronizing the threads that use these data sturcutres?
- When do I want to use
AtomicCellto share data across threads vs using the global
dequeto achieve similar outocme? Does strategies that address these questions change if task are IO-bound?
I know some of these question may arise from my lack of knowledge in this area but I'm interested in finding some examples/tutorials that showcase the crate beyond sharing integers across threads?