Boost Users :
Subject: [Boost-users] [boost-users][signals2] thread-safe disconnection for intrusively ref-counted objects
From: Igor R (boost.lists_at_[hidden])
Date: 2009-05-12 12:17:47
Is there any trick or customization that would allow the subj?
I mean the following situation:
class intrusively_refcounted : //...
// signals will come from another thread
this).track(???)); // can't use here shared_ptr/weak_ptr for tracking
I could store a connection object, so that it would be
destroyed/disconnected in ~intrusively_refcounted(), but I guess it's
not thread-safe, just like the approach with "trackable".
So what would be the correct approach?
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