Full threadinlined·Mistake 10 has a race condition. The shared pointer could be cleaned up between the weak pointer expiry check and lock. Why not just lock and check for null before using it?View on HN