NSLock vs. NSRecursiveLock
NSLock vs. NSRecursiveLock
- Subject: NSLock vs. NSRecursiveLock
- From: Tito Ciuro <email@hidden>
- Date: Fri, 15 Oct 2004 10:19:50 +0200
Hello,
If I understand correctly, if a thread holds an NSLock and attempts to
acquire it again, the thread will freeze. A solution is to use
NSRecursiveLock instead, because the thread can acquire the lock
multiple times without running into a deadlock.
So, is it safer to use NSRecursiveLock instead of NSLock? Are there
instances where it's better to use NSLock over NSRecursiveLock? Are
there any performance advantages perhaps?
Thanks,
-- Tito
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden