Last active
August 17, 2021 19:38
-
-
Save picanumber/686bc8533a3922cd1389db0ba84e22c1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
std::shared_ptr<Locking<X>> yy(std::make_shared<Locking<X>>(X{})); | |
(*yy.get())->f(msg); | |
// This is most likely unsafe, since we can only lock a single copy of the pointer | |
Locking<std::shared_ptr<X>> xx(std::make_shared<X>()); | |
xx->get()->f(msg); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment