Monday, March 20, 2017

Locks with GCD and Swift 3

Even in a Playground it's easy to see how locks work. When useLocks is set to false, a fatal error is thrown before the counter even gets to 5! When it's set to true, the counter can get to its natural endpoint (200).

No comments: