Description
Currently, if a Fiber is PENDING and a kill occurs, whatever ASYNC step was running is considered killed — as far as bracket evaluation is concerned. This results in a temporal inconsistency.
A Fiber remains in PENDING even after the actual asynchronous side-effect has completed — marked by the invocation of the result callback. It is not until the Scheduler gets around to processing the result that the Fiber transitions out of PENDING. Therefore, when a bracket is evaluated, it is not evaluated based on whether the result callback has been invoked — thus the asynchronous side-effect has completed — but rather whether the scheduler got around to processing the result.
The temporal inconsistency is that an asynchronous side-effect may complete before a kill occurs, yet the outcome is as though the kill occurred before the side-effect completed. If the side-effect completes before a kill then it must be evaluated as though it completed, and the kill must be evaluated as though it occurred after.