Skip to content

Consider adding a general capability, independent of current invocation concepts, to align shutdown handling with standard cancellation APIs. (For example, should CancellationToken support be available in async Main?) #1921

Closed

Description

@jonsequitur
No description provided.

Activity

  1. added this to the 2.0 GA milestone on Nov 9, 2022
  2. KalleOlaviNiemitalo commented on Feb 19, 2023

    @KalleOlaviNiemitalo

    What was decided about the question in the title of this issue:

    should CancellationToken support be available in async Main?

  3. jonsequitur commented on Feb 23, 2023

    @jonsequitur
    ContributorAuthor

    Apologies for the absence of a description on this issue. I think the issue might be outside the scope of System.CommandLine but the concept of adding CancellationToken support to Main might be worth a new issue in dotnet/runtime.

    @adamsitnik Thoughts on this?

  4. tmds commented on Mar 22, 2023

    @tmds
    Member

    I always liked the idea of having a CancellationToken for Main. It was something that also came up when we were discussing the PosixSignal API. See dotnet/runtime#50527 (comment) and following comments.

    You can implement it yourself using the PosixSignal API.

    cc @davidfowl

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions