Skip to content

ASYNC Killable Even After Completed #168

Open
@eric-corumdigital

Description

@eric-corumdigital

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions