You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Common Parameters should include a CancellationToken #19685
Issue-Enhancementthe issue is more of a feature request than a bugNeeds-TriageThe issue is new and needs to be triaged by a work group.WG-Enginecore PowerShell engine, interpreter, and runtime
There have been a number of requests to add timeouts to various commands ( why always in seconds ? ) it would be simpler to add CancellationToken support to Common Parameters so that all commands automatically have the capability in a consistent manner.
While superficially a timeout might seem obvious and simple, a CancellationToken is far more useful and allows the client control over when the cancellation is requested, eg not just because of a timeout but because some other condition occurred after the command has been started.
While superficially a timeout might seem obvious and simple, a CancellationToken is far more useful and allows the client control over when the cancellation is requested
Both of these are required. I reiterate that it is important for multithreading. Powershell is different from shell, as it works at the multi-threaded level.
Yes, until the powershell team implements something they dont want to implement for years.
This SignalToken can be used to abort scripts in the pwsh.exe on script creation time.
The other option is off to kill pwsh.exe and open it again.
Issue-Enhancementthe issue is more of a feature request than a bugNeeds-TriageThe issue is new and needs to be triaged by a work group.WG-Enginecore PowerShell engine, interpreter, and runtime
Activity
kasini3000 commentedon May 21, 2023
Both of these are required.
I reiterate that it is important for multithreading. Powershell is different from shell, as it works at the multi-threaded level.
PowerShell/ThreadJob#26
Zetanova commentedon Apr 4, 2024
I found a method to get the SIGINT signal (windows and linux) from the pwsh.exe to be useable for sync-over-async calls on
gist signal-cancellation
Zetanova commentedon Apr 5, 2024
Yes, until the powershell team implements something they dont want to implement for years.
This SignalToken can be used to abort scripts in the pwsh.exe on script creation time.
The other option is off to kill pwsh.exe and open it again.