by richardwhiuk · 11y ago · 0 comments
(I suspect it probably is, but fundamentally, @synchronize is implemented using compare and swap / other processor atomics, so it's probable that the difference is very slight - e.g. there's only a measurable difference if the thread is descheduled while holding a lock).
It's meant to be a somewhat-easy-to-digest introduction to lock-free design, where applicable.
What @synchronized ends up doing is far more complex — it has to be, to ensure the correctness of its purposes: https://github.com/opensource-apple/objc4/blob/master/runtim...
0: http://www.opensource.apple.com/source/objc4/objc4-646/runti...