Skip to content

SetAction overloads should have Task options without CancellationToken #2562

@ericstj

Description

@ericstj

Folks might accidentally pass an async lambda that doesn't accept a cancellation token and the compiler will treat it as async void, which will in turn be treated as a synchronous action by System.Commandline. Many places in our API we treat CancellationToken as optional, we should do so here. Please add overloads that accept Func returning Task without a cancellation token.

Metadata

Metadata

Assignees

Labels

Area-APIbugSomething isn't working

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions