digitalmars.D.learn - How to write correct multi-threaded code?
- Andrey Zherikov (8/8) Oct 16 2019 I'm trying to write multi-threaded code that uses mutexes,
I'm trying to write multi-threaded code that uses mutexes, condition variables and atomics but I've got confused how to do this correctly. Everything I found so far include a lot of casting to/from shared even for the objects that are supposed to be shared (like mutex and condition variable). Is there any good explanation or guide with examples of how to write correct multi-threaded code in D using shared, synchronized, core.sync.* etc things?
Oct 16 2019