[Solved] Stopping a periodic thread-thing in c++
[ad_1] Sorry, but I didn’t find a design simpler than that. You could, make a class that owns both a thread, and a weak_ptr to itself, to be a “holder” that the callable can see it safely, because the callable will still exists even if the object is destructed. You don’t want a dangling pointer. … Read more