mirror of
https://github.com/Moya/Moya.git
synced 2026-03-18 19:52:28 +00:00
Updated DispatchQueue.global with latest Swift syntax.
This commit is contained in:
+2
-2
@@ -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 */ }
|
||||
```
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user