Deprecates `sharedInstance` on `ConcurrentMainScheduler` in favor of `instance`.
This commit is contained in:
parent
62b25c538d
commit
3868268f44
|
|
@ -43,7 +43,7 @@ extension UITextView {
|
|||
// Event needs to happen after text is changed. This is kind of a hacky way, but
|
||||
// don't know any other way for now.
|
||||
let throttledAnyOtherEvent = anyOtherEvent
|
||||
.throttle(0, scheduler: MainScheduler.sharedInstance)
|
||||
.throttle(0, scheduler: MainScheduler.instance)
|
||||
.takeUntil(self?.rx_deallocated ?? Observable.just())
|
||||
|
||||
return Observable.of(textChangedEvent.map { _ in () }, throttledAnyOtherEvent)
|
||||
|
|
|
|||
|
|
@ -35,10 +35,13 @@ public final class ConcurrentMainScheduler : SchedulerType {
|
|||
_mainScheduler = mainScheduler
|
||||
}
|
||||
|
||||
@available(*, deprecated=2.0.0, message="Please use `ConcurrentMainScheduler.instance`")
|
||||
public static let sharedInstance = ConcurrentMainScheduler(mainScheduler: MainScheduler.instance)
|
||||
|
||||
/**
|
||||
Singleton instance of `ConcurrentMainScheduler`
|
||||
*/
|
||||
public static let sharedInstance = ConcurrentMainScheduler(mainScheduler: MainScheduler.sharedInstance)
|
||||
public static let instance = ConcurrentMainScheduler(mainScheduler: MainScheduler.instance)
|
||||
|
||||
/**
|
||||
Schedules an action to be executed immediatelly.
|
||||
|
|
|
|||
Loading…
Reference in New Issue