« Return to Thread: [signals/threadsafe version] Atomic disconnects

Re: [signals/threadsafe version] Atomic disconnects

by Peter Dimov-5 :: Rate this Message:

Reply to Author | View in Thread

Johan Torp wrote:
...

> This means disconnect semantics are different for threaded and
> non-threaded policies. How will you make this clear to users? A
> typical signals n' slots use case  is - at least for me:
>
> signal<void()> sig;
>
> class Foo{
>  Foo() {
>    con = sig.connect(bind(&Foo::some_func, this));
> }
>
>  scoped_connection con;
>
>  void some_func() {}
> };
>
> If the signal was thread-safe this could very well crash the user
> application.

It would also crash if the signal wasn't thread safe, so where's the
difference?

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

 « Return to Thread: [signals/threadsafe version] Atomic disconnects