
13 Mar
2008
13 Mar
'08
8:18 a.m.
Hello Stjepan,
- Can a consumer decide if it will disconnect form its producer inside the invoked operator()-function?
You mean, when the consumer receives a signal, you'd like it to be able to disconnect from the producer that sent the signal?
yes
Another would be to have the consumer keep a copy of the Boost.Signals connection object (for the connection between its producer and itself), and disconnect at will.
I would prefer this solution - maybe signals::filter can provide a bool connected() and void disconnect() function which internaly calls boost::signals::connection::disconnect()? regards, Oliver