GCD vs @synchronized vs NSLock

Viewed 3989

Can someone give a rundown of the benefits and drawbacks of these 3 systems in how they relate to thread safety?

From watching more recent WWDC videos, I get the feeling that Apple is pushing the usage of GCD to create performant reader-writer that are thread safe.

What's the idea/backing behind this? Is it the time to access a lock having to enter the kernel that leads to this GCD push, and shying away from @synchronized and NSLock?

Are @synchronized and NSLock being pushed out of what would be considered best practice, or is there still a place for them?

1 Answers
Related