Program crash in boost::signal<event> dtor

166 views Asked by At

I have a very complex software where I got random crash (mainly in release mode and I cannot easily build a SSCCE), and tracked the crash in the destructor of boost::signal1<event> .

That signal object is used (subscribe/unsubscribe) by several object and used in a multi-threaded software (i mean send by multiple thread and receive by multiple thread).

I heard that boost::signal2 is thread-safe and I would like to know if regarding the symptom description, you have the same feeling than me ? That I need to use the Signal2

Comments, Feelings, and feedback are welcome, as i start to rebuild boost for signal2!

1

There are 1 answers

0
Mark B On

If you aren't already protecting your multi-threaded subscribe/disconnect/RAII disconnect with a mutex then you absolutely need to be using signals2 instead of signals.