Skip to content

Conversation

@Iliya-usov
Copy link
Collaborator

No description provided.

@Iliya-usov Iliya-usov requested a review from ForNeVeR March 16, 2021 20:54
@Iliya-usov Iliya-usov force-pushed the AsyncTermination branch 3 times, most recently from 5a1eda8 to c0a88be Compare March 16, 2021 22:31
if (task.IsCompleted)
return task;

var timer = new System.Timers.Timer(timeoutMs) {AutoReset = false};
Copy link
Collaborator

Choose a reason for hiding this comment

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

Wouldn't it be better to do this via Task.Delay(timeoutMs).ContinueWith(_ => myTcs.TrySetResult(false)), or something alike?

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.

4 participants