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

Available on Google Play Music

Visit Void Star Podcast’s page on Google Play Music. Please Click ‘Subscribe’ and leave a comment.

Listen on Google Play Music
Available on Stitcher

Visit Void Star Podcast’s page on Sticher. Please Click ‘Subscribe’ and leave a comment.

Listen to Stitcher

Your app not listed here? Not an issue..

You should be able to search for ‘VoidStar Podcast’ on your favorite app. Most apps use one of the above sources for listing podcasts. This was tested on Podcast Addict (where you can also specify the search engine) and RatPoison on Android.