The third installment of the tutorial is now online. I’m talking about shared memory concurrency and races, but with a tiny dollop of theory on top. It’s all illustrated with simple examples. Enjoy!
Follow @BartoszMilewski
September 12, 2011
C++11 Concurrency Tutorial: 3. Sharing
Posted by Bartosz Milewski under C++, Concurrency, Multithreading, Programming, Tutorial[5] Comments
September 12, 2011 at 12:17 pm
I’m thoroughly enjoying this tutorial series. I think you’re doing a wonderful job of explaining things. Your pace is perfect. Keep them coming!
I got a chuckle from the fact you finished this segment with a cliff hanger. I’ll have to wait until the next segment to learn how to pass data back from a thread.
September 12, 2011 at 4:18 pm
[…] Read the whole article […]
September 14, 2011 at 10:20 am
What came to my mind when I saw your last example was the Go language and its “Don’t communicate by sharing memory; share memory by communicating” slogan. Go encourages programmers to pass around references to shared data so that only one thread is allowed to access the data at any one time. It looks like move semantics could serve a similar purpose of passing around ownership between threads…
September 14, 2011 at 10:59 pm
@Andreas: Move semantics works great between two threads but when you want to fork many threads you need more than that. That’ll be the topic of future tutorials.
March 20, 2012 at 2:22 pm
programmatore php…
[…]C++11 Concurrency Tutorial: 3. Sharing « Bartosz Milewski's Programming Cafe[…]…