Closed nicknisi closed 7 years ago
@@ master #264 diff @@
==========================================
Files 34 34
Lines 1828 1829 +1
Methods 19 19
Messages 0 0
Branches 354 354
==========================================
+ Hits 1731 1741 +10
+ Misses 34 27 -7
+ Partials 63 61 -2
Powered by Codecov. Last update bd37616...18ca9f1
Prevent scenario where finally call after cancel results in a resolved Task.
Currently,
Task#finally
will return a new resolved Task when the task has already been cancelled. This leads to some inconsistencies where the Task returned by Finally will either be resolved or will not be resolvable, all depending on whencancel
is called.This fixes the inconsistency by instead calling the callback passed to
finally
and then returning the same Task instance, which won't resolve if the Task has been cancelled.