[Documentation] [TitleIndex] [WordIndex

Background

The ideas for this signal/slots implementation come from a few sources.

Qt was the original signal/slots implementation, but it needs a pre-processor to compile the code. Sigslot and Boost on the other hand are pure ISO C++, but both have some disadvantages. The boost implementation is fairly heavy and a little cumbersome, although its now morphing into version 2 with even more functionality (I haven't yet road tested a comparison between the two). Sigslot was the precursor, is more lightweight, but has some oddities - it isn't fully typesafed, can't handle global/static function loading.

None of these are thread-safe and it can be somewhat inconvenient manually connecting signal-slot pairs when they are buried far from each other (e.g. deep in parallel heirarchies of c++ objects).

This motivated this library - what was needed was an abstract way of connecting pairs with an engine in the background to do the hard work - ultimately leaving the programmer free from any tedious details. To do this, the sigslots library uniquely names connections (i.e. topic name in ros-speak), via a string. Signals and slots can connect to the topic simply by referring to a string. This was originally motivated by the way many posix ipc structures connect (e.g. semaphores and shared memory), but later also merged very neatly with the way ros topics connect (in particular nodelets). Adding mutex's for thread safety so that sigslot destruction would occur safely was the next step.


2022-05-28 12:34