Created
June 5, 2019 05:58
-
-
Save hermanbanken/f85d5e7e9db39dda1b082f0f5b6b695d to your computer and use it in GitHub Desktop.
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
| @available(iOS 13.0, *) | |
| let p = Publishers.Future { (subscriber: @escaping (Result<Int,Error>) -> Void) in | |
| DispatchQueue.main.asyncAfter(deadline: .now() + .seconds(2), execute: { | |
| subscriber(.success(42)) | |
| }) | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment