Boost logo

Boost Users :

From: frantz.maerten_at_[hidden]
Date: 2005-02-10 05:46:03


I took a look at libsidc++ and found very interresting the way of
blocking/unblocking connections.

I added some small modifications in boost::signals lib in order to have this
functionality (2 patches in attachment to apply at the parent of the
boost_1_32_0 distrib). Only the interface of connection has changed (3 new
methods), and I added a boolean flag in basic_connection struct.

So, my questions are:
1) is it interresting to incorporate it (for me, YES, it is veru useful)?
2) is it a safe implementation?

You can test it like that:
  MySignal sig ;
  boost::signals::connection conn1 = sig.connect(&fct1) ;
  boost::signals::connection conn2 = sig.connect(&fct2) ;

  sig(10) ; // call fct1 and fct2

  conn1.block() ;
  sig(20) ; // call only fct2

  conn1.unblock() ;
  sig(30) ; // call fct1 and fct2




Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net