« 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:
...

> Thanks for the clarification. This solution forces the use of shared_ptrs
> and might keep a Foo instance alive a little bit longer. Especially the
> latter requirement is a no-no for me.

If thread A is in the middle of a call to foo.f() and thread B attempts to
destroy foo, your only options are (1) keep foo alive a little bit longer or
(2) crash. Of course I may be missing something.

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

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