News for hackers. Stuff that matters.
Re:Atomics in Objective-C by ksherlock on Tuesday May 05, 2015 @02:42PM (#9494158)
@synchronized calls objc_sync_enter and objc_sync_exit. Source code is available[0]. Best case, the thread already has the object locked and only needs to increment a lock count. Worst case, it spin locks, searches through a linked list of existing locks, then needs to malloc a new entry and create a new mutex for it.

0: http://www.opensource.apple.com/source/objc4/objc4-646/runti...

There are no comments on this comment yet.