dotnet / dotnet/command-line-api

Feature Request: Add Async Completion Source

Open
#1,690 0 comments 1 reaction 0 assignees View on GitHub
enhancement
Dominant language
C#
Stars
3.7k
Forks
428
PR merge metrics
No merged PRs in 30d

Description

It would be nice if we could use an async completion source so that when making expensive calls to evaluate completions, a Ctrl+C escape can signal to the cancellation token to quit.

Proposal: Add `AsyncCompletionSource` which implements `ICompletionSource` but uses a `Task>` with a cancellation token that can be signalled via Ctrl+C.

It _looks_ as though the completion shim would need to pass this along somehow - I'd be happy to contribute this if it's deemed in scope and given some pointers around the code flow.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.