Created
September 4, 2016 20:07
-
-
Save lizixroy/39ea2f4d3de8e73ad20ce8317392cc84 to your computer and use it in GitHub Desktop.
RxSwift-article-13.swift
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
func synchronizedUnsubscribe(disposeKey: DisposeKey) { | |
_lock.lock(); defer { _lock.unlock() } | |
_synchronized_unsubscribe(disposeKey) | |
} | |
func _synchronized_unsubscribe(disposeKey: DisposeKey) { | |
if _disposed { | |
return | |
} | |
_ = _observers.removeKey(disposeKey) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment