Skip to content

Instantly share code, notes, and snippets.

@mgrebenets
Created March 10, 2018 11:01
Show Gist options
  • Save mgrebenets/b93c9fbacdd2e42afa830777640649fe to your computer and use it in GitHub Desktop.
Save mgrebenets/b93c9fbacdd2e42afa830777640649fe to your computer and use it in GitHub Desktop.
Async Swift Scripting - 7
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