Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Stl.Async-way of awaiting WaitHandle #672

Open
AliveDevil opened this issue Nov 27, 2023 · 3 comments
Open

Add Stl.Async-way of awaiting WaitHandle #672

AliveDevil opened this issue Nov 27, 2023 · 3 comments

Comments

@AliveDevil
Copy link
Contributor

I'd like to see some general-purpose ready-to-use implementation of Task WaitOneAsync(this WaitHandle, CancellationToken).
Maybe going as far as returning a ValueTask, though that may be challenging here.

Proposed API:

Task WaitOneAsync(this WaitHandle, CancellationToken = default)
Task WaitOneAsync(this WaitHandle, int Timeout, CancellationToken = default)
@AliveDevil
Copy link
Contributor Author

If this is a worthwhile addition, I can check to implement this in the not-so distant future.

@alexyakunin
Copy link
Collaborator

Hi, sorry, just noticed this - IMO this can wait. As far as I remember, Stl.* doesn't await on WaitHandle-s, so I'd rather postpone this until it's going to be necessary.

@alexyakunin
Copy link
Collaborator

@AliveDevil ^

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

No branches or pull requests

2 participants