Are there interlocked(atomic) operations in iOS SDK?
I need interlocked increment\\decrement and interlocked comparsion.
*UPDATE: * My main proble
Objective-C has the keyword synchronized for atomic operations.
@synchronized(object) { // ... }
If you specify the attribute atomic in a property declaration, the setters and getters will be sythesized using these synchronized-blocks.
Also look at NSLock and NSLocking protocol.
NSLock
NSLocking