-
Notifications
You must be signed in to change notification settings - Fork 130
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
Says "the method invoking await must return a CompletableFuture" but it does already #34
Comments
It also seems like if you have instrumented your code it will always give:
I am not sure if the
|
@TryingToImprove if you have properly instrumented your code, the call to |
Getting this warning, too, despite initialized directly in the main method with Await.init(). |
I am seeing this, too, even while my code (under test) runs as expected. Would a reproducer be helpful? |
If you forget to instrument the code, the wrong warning message is printed:
instead of
As shown by the following simple example:
This is because calling
InitializeAsync.isRunning()
triggers the class initialization, and only enters that method onceisRunning = true
. The only ways to haveisRunning()
returning false is if either the initialization crashes or if called from multiple threads.In addition, I think it would be better to throw an exception than calling
join()
. In the above example this causes a deadlock, and you don't know which method it is referring to.The text was updated successfully, but these errors were encountered: