Created
April 18, 2016 12:01
-
-
Save comfly/616c1861443569459775b0feef2f8e4c 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
func synchronized(object: AnyObject, @noescape closure: () -> Void) { | |
objc_sync_enter(object) | |
closure() | |
objc_sync_exit(object) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment