Skip to content

Instantly share code, notes, and snippets.

@romanmiller
Created November 28, 2017 16:44
Show Gist options
  • Save romanmiller/10f5eca01284e4db043d5ef54a714765 to your computer and use it in GitHub Desktop.
Save romanmiller/10f5eca01284e4db043d5ef54a714765 to your computer and use it in GitHub Desktop.
ReactiveKit + BrightFutures (Future+Extension)
public extension Future {
var signal : Signal<T, E> {
return Signal { observer in
self.onSuccess(callback: observer.next)
self.onFailure(callback: observer.failed)
return observer.disposable
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment