Base class that provides automatic thread-safe method locking in mulle-objc. Inherits from MulleDynamicObject and adds recursive locking capabilities.
MulleDynamicObject
NSRecursiveLock *__lock; // Recursive lock for thread safety
+locklessObject
- Creates instance without lock-initNoLock
- Initializes without lock-init
- Initializes with lock-lock
- Acquires the lock-unlock
- Releases the lock-tryLock
- Attempts to acquire lock without blocking-didShareRecursiveLock:
- Called after lock sharing to update thread affinity-shareRecursiveLock:
- Shares lock with another lock-shareRecursiveLockWithObject:
- Shares lock with another MulleObject-__lockingForward:
- Handles locking for forwarded methods-__lockingSuperForward:
- Handles locking for super forwarded methods// Create thread-safe object
@interface MyObject : MulleObject <MulleAutolockingObjectProtocols>
@end
// Create lockless object
MyObject *obj = [MyObject locklessObject];
// Share lock between objects
MyObject *obj2 = [MyObject new];
[obj2 shareRecursiveLockWithObject:obj];
// Methods are automatically locked
[obj doSomething]; // Thread-safe