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

Nicer wait with timeout API #90

Open
tinywombat765 opened this issue May 25, 2021 · 4 comments
Open

Nicer wait with timeout API #90

tinywombat765 opened this issue May 25, 2021 · 4 comments

Comments

@tinywombat765
Copy link
Contributor

liburing has a way to block until completion events come in. I'd be nice to have that functionality in this library. Some like https://unixism.net/loti/ref-liburing/completion.html#c.io_uring_wait_cqe

@tinywombat765
Copy link
Contributor Author

Or does submit_and_wait do that? If so, is there a way to set a timeout?

@tinywombat765
Copy link
Contributor Author

Okay, I see how this is supposed to work. The thing I'm after is waiting with a timeout. I believe the way to do this is to submit a timeout event then call submit_and_wait. I'd be nice to have a simple wait with timeout function like liburing has.

@tinywombat765 tinywombat765 changed the title Wait for completion Nicer wait with timeout API May 25, 2021
@quininer
Copy link
Member

You can also use SubmitArgs, see https://github.com/tokio-rs/io-uring/blob/master/io-uring-test/src/tests/timeout.rs#L266

@tinywombat765
Copy link
Contributor Author

Thanks! That's exactly what I'm looking for. Maybe add doc comment saying that's what that timespec does.

quininer added a commit that referenced this issue Aug 14, 2021
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 a pull request may close this issue.

2 participants