Skip to content

Conversation

zeotuan
Copy link
Contributor

@zeotuan zeotuan commented Mar 7, 2024

Fix CancelAsync causing deadlocking:

it now signal WaitHandle of Cancelled event after sending SIGTERM/SIGKILL signal to try to abort the request.

close #1147 and close #1023

@zeotuan zeotuan marked this pull request as ready for review March 7, 2024 02:14
Copy link
Collaborator

@Rob-Hague Rob-Hague left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be possible to add a test for forceKill = true as well?

/// </summary>
public void CancelAsync()
/// <param name="forceKill">if true send SIGKILL instead of SIGTERM.</param>
public void CancelAsync(bool forceKill = false)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps we drop the Async suffix here (and obsolete CancelAsync) as it is not an async method. @WojciechNagorski?

@zeotuan zeotuan requested a review from Rob-Hague March 21, 2024 22:55
Copy link
Collaborator

@WojciechNagorski WojciechNagorski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately, I don't have much time for this project at the moment. Only PRs that have @Rob-Hague's approval are verified and merged by me.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CancelAsync does not cancel the command started by BeginExecute and blocks execution Is it possible to cancel SshCommand?

3 participants