Last active
August 17, 2021 19:16
-
-
Save picanumber/f1c9169d457bfddd9b2bcae1131a434a 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
class X | |
{ | |
int i = 0; | |
public: | |
int f(const char *msg) const | |
{ | |
return i++; | |
} | |
}; | |
Locking<X> aa(X{}); | |
aa->f(msg); // This call is thread-safe |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment