btcsignals is a simple mechanism for signaling events to multiple subscribers. It is api‐compatible with a minimal subset of boost::signals2.

Description

Rather than using a custom slot type, and the features/complexity that they imply, std::function is used to store the callbacks. Lifetime management of the callbacks is left up to the user.

All usage is thread‐safe except for interacting with a connection while copying/moving it on another thread.

Types

Name

Description

any_of

A combiner, which checks if at least one callback returned true.

connection

State object representing the liveness of a registered callback. signal::connect() returns an enabled connection which can be held and disabled in the future.

null_value

The default combiner, which only returns void.

scoped_connection

RAII‐style connection management that disconnects on destruction.

signal

Functor for calling zero or more connected callbacks.

Created with MrDocs