Skip to content

Improve pipeline thread consumer task cancellation #1594

@rjmholt

Description

@rjmholt
Contributor

Because the pipeline thread consumer is single-threaded and runs tasks sequentially, there's the real possibility that a single bad task could starve it.

For now, Ctrl+C should cancel whatever task is running. This may indeed include background tasks...

But some ideas for improving this are:

  • A key-chord to cancel/unblock the pipeline thread when something other than console input is being run
  • A monitor thread to supervise the pipeline thread that:
    • Logs when tasks drag on
    • Alerts users to long running tasks
    • Allows cancellation
    • Can completely reset the main runspace...

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @rjmholt@StevenBucher98

        Issue actions

          Improve pipeline thread consumer task cancellation · Issue #1594 · PowerShell/PowerShellEditorServices