Created
February 4, 2011 15:27
-
-
Save netshade/811231 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
@interface SomeSingleton { | |
uint8_t * someBlockOfMemory; | |
} | |
@property(readwrite, atomic, assign) uint8_t * someBlockOfMemory; | |
+(id) sharedInstnace; | |
@end | |
// Thread A | |
SomeVolatileActionOn([[SomeSingleton sharedInstance] someBlockOfMemory]); | |
// Thread B | |
SomeVolatileActionOn([[SomeSingleton sharedInstance] someBlockOfMemroy]); | |
^ not thread safe | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment