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

AsyncContext::wait() is not actually waiting #548

Open
gdesmott opened this issue Jan 20, 2023 · 2 comments
Open

AsyncContext::wait() is not actually waiting #548

gdesmott opened this issue Jan 20, 2023 · 2 comments

Comments

@gdesmott
Copy link

AsyncContext::wait() is documented as :

Spawns a future into the context, waiting for it to resolve.

But according to my tests wait() is actually not blocking and return right away, instead of waiting for the future to be done.

This is pretty confusing, it would be good to clarify its exact behavior in the documentation.

@Sytten
Copy link
Contributor

Sytten commented Jan 20, 2023

AFAIK it means that the actor will wait on that future before making anymore progress (like reading new messages or polling children futures).

@gdesmott
Copy link
Author

Indeed, that seems to match was I observed and my understanding of the code.

I think it's worth to make the documentation clearer about the exact semantic of this API as I spent quite some time figuring it out.

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