16 Dec
2010
16 Dec
'10
4:26 p.m.
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Thursday 16 December 2010, Dmytro Ovdiienko wrote:
I've just realized weak_ptr::lock is not thread safe. Is it expected behavior? Following sample reproduced this conclusion.
It is thread safe. Your code appears to have a race in it between destroying the shared_ptr and locking the weak_ptr. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEARECAAYFAk0KPcEACgkQ5vihyNWuA4WVkACeIk8QpbEhF5/k5szY2o6rJ7Ep gHgAoOVPbV/uBAsZTWWjqrwClK6ITZeK =6DeE -----END PGP SIGNATURE-----