Created
March 10, 2018 11:01
-
-
Save mgrebenets/b93c9fbacdd2e42afa830777640649fe to your computer and use it in GitHub Desktop.
Async Swift Scripting - 7
This file contains hidden or 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
MUTEXT = CREATE_MUTEX() | |
LOCK(MUTEX) // Main queue | |
Alamofire.request("http://httpbin.org/get") | |
.responseJSON { response in | |
print(response) // Result of response serialization | |
UNLOCK(MUTEX) // Main queue! | |
} | |
WAIT(MUTEX) // Main queue |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment