There are two ways to disconnect signals in Dataflow.Signals. One is the disconnect_all function, which can be applied to any component based on filter, and will disconnect everything connected to the default output signal of that component (it will not disconnect anything connected to the consumer ports of that component). The other way involves storing the Boost.Signals connection object, which is returned by the connect function.

Here is an example showing both:

signals::storage<void ()> banger; 
// counter will count the number of signals it receives       
signals::counter<void ()> counter;

connect(banger, counter);
banger(); // this signal will pass to counter
BOOST_CHECK_EQUAL(counter.count(), 1);

disconnect_all(banger);
banger(); // this signal will not pass to counter
BOOST_CHECK_EQUAL(counter.count(), 1);

signals::connection c = connect(banger, counter);
banger(); // this signal will pass to counter
BOOST_CHECK_EQUAL(counter.count(), 2);

c.disconnect();
banger(); // this signal will not pass to counter
BOOST_CHECK_EQUAL(counter.count(), 2);