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 a method to await a specific event #10

Open
gunnarmorling opened this issue Dec 17, 2020 · 1 comment
Open

Add a method to await a specific event #10

gunnarmorling opened this issue Dec 17, 2020 · 1 comment

Comments

@gunnarmorling
Copy link
Member

From Julien Viet: https://twitter.com/julienviet/status/1339523188301152262

There should be a method acting as barrier that a specific event (e.g. socket write) has happened.

@phejl
Copy link
Contributor

phejl commented Aug 18, 2021

I've briefly looked into this and it would need some clarification on the use case (as I don't want to make wrong assumptions). From my point of view options would be:

  • Await for any matching event "in history" (so it won't wait if we have received an event or we will wait for it otherwise). One might use existing reset() to clear history.
  • Await for an upcoming event from now where now would be a just the moment of the call - like a wall clock so events from the JFR might have happened a bit earlier if those were delayed.
  • Await for an upcoming event after performing the sync through awaitEvents - more precise definition of "now" but likely tricky to implement.

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