Boost logo

Boost :

Subject: [boost] semi lock-free Signals/Slots
From: Andrew Ho (helloworld922_at_[hidden])
Date: 2013-07-24 03:30:19

Hi, I've been doing some testing with implementing a semi lock-free
Signals/Slots library.


1. emits are lock-free thanks to atomic shared_ptr's/other atomic operations.
2. Only a single writer is allowed at a time, uses a mutex for locking.

The primary goal is to improve low and no slot-count signal emit performance.

In tests, I have been able to get substantial performance boosts (~2 to 5
times) on low slot-count signals, approaching the same performance as signals2
in low-contention (basically, single thread testing). I haven't tested high
emit contention performance, though I suspect this library will excel quite
well here because there is no locking on emit.

The test implementation is still incomplete, and notably uses many C++11
features, though I don't think any of features I'm using can't be ported one
way or another for C++03 support.

Even if the library isn't used in full, some of the ideas might be implemented
into the existing Signals2 library.


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