Closed peyton closed 8 years ago
Hey, it was surprising that delay() operated in parallel, eg
delay()
let t0 = CACurrentMediaTime() future { return } .delay(1) .andThen { _ in print("\(CACurrentMediaTime() - t0) sec" } .delay(1) .andThen { _ in print("\(CACurrentMediaTime() - t0) sec" }
yields
1 sec 1 sec
This pull request modifies delay() so that the above example yields
1 sec 2 sec
I'm new to the library, so feel free to suggest changes or reject. Thanks!
Thanks for the PR!
The behavior of delay you found is indeed wrong, and the fix looks right to me. I have one remark that I'll post as an inline comment. I hope you can address that.
delay
Thanks again! Merged.
Hey, it was surprising that
delay()
operated in parallel, egyields
This pull request modifies
delay()
so that the above example yieldsI'm new to the library, so feel free to suggest changes or reject. Thanks!