Boost logo

Boost :

Subject: [boost] Performance characteristics of Boost mutex
From: Philip Bennefall (philip_at_[hidden])
Date: 2014-10-17 14:49:24

Hi all,

I am detecting some lock contention in my application, and while reading
up on this I came across the concept of lightweight mutexes versus
supposedly non-lightweight mutexes. I am wondering, can Boosts
non-recursive mutex implementation be considered lightweight? In
boost/detail I see lightweight_mutex. Should I be using that? I need no
interprocess support here, and I want the lock to be as fast as
possible. If I do decide to use lightweight_mutex, is it compatible with
the regular non-recursive Boost mutex so that I can use it with higher
level classes like lock guard, condition variables, barriers etc?

Thanks in advance for any insight.

Kind regards,

Philip Bennefall

Boost list run by bdawes at, gregod at, cpdaniel at, john at