Last active
September 13, 2017 10:05
-
-
Save Otbivnoe/3a49c44ec77f0a3ac6318ce65689ef2b to your computer and use it in GitHub Desktop.
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
| let queue = DispatchQueue.global() | |
| let scheduler = ConcurrentDispatchQueueScheduler(queue: queue) | |
| let observable = Observable<Void>.create { observer in | |
| observer.onCompleted() | |
| return ScheduledDisposable(scheduler: scheduler, disposable: Disposables.create { | |
| print("thread - \(Thread.current)") | |
| }) | |
| } | |
| observable.subscribe() | |
| // log: | |
| // thread - <NSThread: 0x7f9631d62e60>{number = 3, name = (null)} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment