Skip to content

Instantly share code, notes, and snippets.

@lizixroy
Created September 4, 2016 20:07
Show Gist options
  • Save lizixroy/39ea2f4d3de8e73ad20ce8317392cc84 to your computer and use it in GitHub Desktop.
Save lizixroy/39ea2f4d3de8e73ad20ce8317392cc84 to your computer and use it in GitHub Desktop.
RxSwift-article-13.swift
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