Last active
June 28, 2019 05:49
-
-
Save eunjin3786/47ef9b31d276573c6a81eb02107a782a 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
let backgroundScheduler = SerialDispatchQueueScheduler(qos: .background) | |
Observable.just(1) | |
.map { _ in | |
print(Thread.isMainThread) // false | |
} | |
.subscribeOn(backgroundScheduler) | |
.map { _ in | |
print(Thread.isMainThread) // false | |
} | |
.subscribe(onNext: { | |
print(Thread.isMainThread) // false | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment