Skip to content

Instantly share code, notes, and snippets.

@LucianoPAlmeida
Last active April 21, 2018 21:56
Show Gist options
  • Save LucianoPAlmeida/e42b81d131524918829faa6c75df3675 to your computer and use it in GitHub Desktop.
Save LucianoPAlmeida/e42b81d131524918829faa6c75df3675 to your computer and use it in GitHub Desktop.
class Event {
var count: Int = 0
let lock = NSLock()
func start() {
lock.lock()
count += 1
lock.unlock()
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment