Created
November 1, 2020 01:23
-
-
Save masakih/5c92c2e54c97790c5525fbc601384f60 to your computer and use it in GitHub Desktop.
これ必要でしょ? #CodePiece
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
| extension Combine.Future { | |
| convenience init<S: Scheduler>(on scheduler: S, _ attemptToFulfill: @escaping (@escaping Future<Output, Failure>.Promise) -> Void) { | |
| self.init { promise in | |
| scheduler.schedule { | |
| attemptToFulfill(promise) | |
| } | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment