PowerShellEditorServices icon indicating copy to clipboard operation
PowerShellEditorServices copied to clipboard

Improve pipeline thread consumer task cancellation

Open rjmholt opened this issue 4 years ago • 0 comments

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...

rjmholt avatar Oct 26 '21 21:10 rjmholt