Updated DispatchQueue.global with latest Swift syntax.

This commit is contained in:
Adam McDonald
2019-05-09 11:12:24 -07:00
committed by GitHub
parent ae2ca8a51c
commit 632e2f74ec
+2 -2
View File
@@ -3,7 +3,7 @@
By default, all of your requests will be put onto a background thread by `Alamofire`, and the
response will be called on the main thread. If you want your response called on a different thread, you can initialize your `Provider` with a specified `callbackQueue`:
```swift
provider = MoyaProvider<GitHub>(callbackQueue: DispatchQueue.global(.utility))
provider = MoyaProvider<GitHub>(callbackQueue: DispatchQueue.global(qos: .utility))
provider.request(.userProfile("ashfurrow")) {
/* this is called on a utility thread */
}
@@ -27,4 +27,4 @@ provider.reactive.request(.userProfile("ashfurrow"))
.map { /* this is called on the current thread */ }
.observe(on: QueueScheduler(qos: .utility))
.map { /* this is called on a utility thread */ }
```
```