Last active
April 21, 2018 21:56
-
-
Save LucianoPAlmeida/e42b81d131524918829faa6c75df3675 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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