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

Use async for the instance's wait method #885

Merged
merged 2 commits into from
Feb 27, 2025

Conversation

jprendes
Copy link
Collaborator

This PR changes the Instance's wait method to be async.
This is a step towards migrating to an async shim.

This has the nice benefit that we get sync probing (try_wait) and timed wait (wait_timeout) for free.
We get probing through FutureExt::now_or_never, and timed wait through tokio::time::timeout.
This also simplifies the implementation of WaitableCell a fair bit.

Signed-off-by: Jorge Prendes <jorge.prendes@gmail.com>
@jprendes jprendes force-pushed the async-instance-wait branch from 969ca6e to ae5cc22 Compare February 27, 2025 14:14
Signed-off-by: Jorge Prendes <jorge.prendes@gmail.com>
@jprendes jprendes force-pushed the async-instance-wait branch from 63aea5e to 8ae2435 Compare February 27, 2025 16:48
@jprendes jprendes merged commit 3a72785 into containerd:main Feb 27, 2025
77 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants