Manoj Rao bio photo

Manoj Rao

Your Average Common Man

Email Twitter Github

In an earlier post, I pointed to Sean Parent’s talk called C++ Seasoning and how it is useful in writing better programs. After posting multiple articles about threading, concurrency, parallel programming and other rich sources of strange issues I thought I would watch a talk given by an actual expert on the subject for a change.

No Raw Sync Primitives

Basically, Sean discourages you from reinventing the wheel, or a bicycle, or a motorcycle. In this talk, he helps you achieve greater speed He discourages the use of raw synchronization primitives such as mutex, semaphore, fence etc.

Why Not?

"Because you won't get it right"
"Amen"

Traditional Synch Primitives:

synch primitives

Single Queue Example - Don’t try to speed the queue up, try to get off it

single queue

Try To Minimize the time spent in non parallelizable parts.

Futures in C++

Although it does take away some perf, it provides nice things like provide exception aggregation. What they lack:

futures lack

Conclusion:

Another informative talk by Sean that can hopefully improve our concurrency coding chops.


My Podcast!

If you like topics such as this then please consider subscribing to my podcast. I talk to some of the stalwarts in tech and ask them what their favorite productivity hacks are:

Available on iTunes Podcast

Visit Void Star Podcast’s page on iTunes Podcast Portal. Please Click ‘Subscribe’, leave a comment.

Get it iTunes