![deadlockResolved](https://www.modernescpp.com/wp-content/uploads/2016/05/deadlockResolved.png)
Prefer Locks to Mutexes
/
2 Comments
If the previous post showed something, it's that you should use mutexes with great care. That's why you…
![Deadlock](https://www.modernescpp.com/wp-content/uploads/2016/05/Deadlock.png)
The Risks of Mutexes
The usage of mutexes seems extremely simple. There is a critical section in the code that a single thread…
![readerWriterLocks](https://www.modernescpp.com/wp-content/uploads/2016/05/readerWriterLocks.png)
Reader-Writer Locks
With C++14 came reader-writer locks. The idea is straightforward and promising. Arbitrary reading threads…
![timeline](https://www.modernescpp.com/wp-content/uploads/2016/04/timeline.png)
Source Code Repository
I created a repository for the source code. It's on GitHub and has the name ModernesCppSource:https://github.com/RainerGrimm/ModernesCppSource.git
This…
![bossWorker](https://www.modernescpp.com/wp-content/uploads/2016/04/bossWorker.png)
Threads Sharing Data
One of the biggest challenges of thread management begins when the threads share non-const data
Data…
![Sleeper](https://www.modernescpp.com/wp-content/uploads/2016/04/Sleeper.png)
Thread Arguments
A thread gets its data by copy or by reference. By default, you should use by copy. Why? In case your…
![threadForgetJoin](https://www.modernescpp.com/wp-content/uploads/2016/04/threadForgetJoin.png)
Threads Lifetime
The parent has to take care of their child. This simple idea has big consequences for a thread lifetime.…
![RainerGrimmSmall](https://www.modernescpp.com/wp-content/uploads/2016/04/RainerGrimmSmall.png)
For the Proofreaders and the Curious People
After a lot of discussion with my proofreaders, we finally have a process to publish the articles.
How…
![createThread](https://www.modernescpp.com/wp-content/uploads/2016/04/createThread.png)
Thread Creation
Thread creation is easy. Call std::thread, and a new thread will be created. The thread gets a…
![timeline](https://www.modernescpp.com/wp-content/uploads/2016/04/timeline.png)
Multithreading in Modern C++
With the new C++11 Standard, C++ faces the first-time challenges of multicore architectures. The…