Chapter 1. Boost.Signals (thread_safe_signals version) OBSOLETE!

THIS LIBRARY HAS BEEN MERGED INTO THE MAIN BOOST 1.39 DISTRIBUTION AS BOOST.SIGNALS2. THIS OLDER STAND-ALONE VERSION WILL NO LONGER BE MAINTAINED.

Douglas Gregor

Frank Mori Hess

Use, modification and distribution is subject to the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

Introduction

The Boost.Signals library is an implementation of a managed signals and slots system. Signals represent callbacks with multiple targets, and are also called publishers or events in similar systems. Signals are connected to some set of slots, which are callback receivers (also called event targets or subscribers), which are called when the signal is "emitted."

Signals and slots are managed, in that signals and slots (or, more properly, objects that occur as part of the slots) can track connections and are capable of automatically disconnecting signal/slot connections when either is destroyed. This enables the user to make signal/slot connections without expending a great effort to manage the lifetimes of those connections with regard to the lifetimes of all objects involved.

When signals are connected to multiple slots, there is a question regarding the relationship between the return values of the slots and the return value of the signals. Boost.Signals allows the user to specify the manner in which multiple return values are combined.

thread_safe_signals

This documentation describes a thread-safe variant of the official Boost.Signals library. There have been some changes to the interface to support thread-safety, mostly with respect to automatic connection management. This implementation was written by Frank Mori Hess. Acknowledgements are also due to Timmo Stange, Peter Dimov, and Gottlob Frege for ideas and feedback, and to Douglas Gregor for the original version of Boost.Signals this effort was based on.

Download

The latest release is available from the Boost vault. The development version of the code is available in the sandbox of the Boost svn. The files for thread_safe_signals are located in the sandbox/thread_safe_signals subdirectory and may be browsed online or checked out with the following command:

svn co http://svn.boost.org/svn/boost/sandbox/thread_safe_signals thread_safe_signals

The current version of this document should be available online.