Hi all,
shared_from_this in multiple threads? Since if I understand correctly, constructing a shared_ptr with a shared_ptr or weak_ptr object, is thread safe.Take the following code as an example:
class A : public std::enable_shared_from_this<A> {
public:
std::shared_ptr<A> clone() {
return shared_from_this();
}
};In this case, can I call A::clone() in multiple threads?
Regards