TSNAtomicFlag 1.0

TSNAtomicFlag 1.0

TestsTested
LangLanguage Obj-CObjective C
License MIT
ReleasedLast Release Feb 2015

Maintained by Brian Lambert.



  • By
  • Brian Lambert

TSNAtomicFlag is a thread-safe boolean for use in multi-threaded applications.

TSNAtomicFlag * atomicFlag = [[TSNAtomicFlag alloc] init];
if ([atomicFlag trySet])
{
    NSLog(@"The flag was set!");
}
if ([atomicFlag isSet])
{
    NSLog(@"The flag is set!");
}
if ([atomicFlag tryClear])
{
    NSLog(@"The flag was cleared!");
}
if ([atomicFlag isClear])
{
    NSLog(@"The flag is clear!");
}

TSNAtomicFlag is released under an MIT license, meaning you're free to use it in both closed and open source projects. However, even in a closed source project, please include a publicly-accessible copy of TSNAtomicFlag's copyright notice, which you can find in the LICENSE file.

If you have any questions about, suggestions for, or contributions to TSNAtomicFlag, please contact me.