Skip to content

Discussion: Cancel-myself-now operation? cancel-and-wait-for-it-to-finish operation? #658

@belm0

Description

@belm0

it isn't apparent from the docs that cancel() is non-raising, and that when you call it from within a nursery the program flow will continue until the next checkpoint

it seems like a common use case will be to abort from within a nursery scope using cancel() and sleep(0). Perhaps nursery should have a cancel_now() or abort() method

my use case was related to having a task meet the start() protocol invariant of either calling started or raising

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