-
Notifications
You must be signed in to change notification settings - Fork 573
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
Instrumentation verification doesn't work in this use case #104
Comments
You need to declare your interface method Verification should point it out though and it doesn't instead, this is something I'll look into. |
@circlespainter Note that verification isn't actually turned on (in spite of the |
@pron Right, but even when uncommenting it (so that the warning about the instrumentation verification being enabled is printed out) the issue is not detected. |
Indeed, placing the |
This is what instrumentation verification is for (in addition to tests); this is a very unfortunate (and rare) case where an uninstrumented call site goes undetected by instrumentation verification. We're already working on an improvement that will fix this. Instrumentation verification is expensive though, that's why it's not always enabled by default and it should be used only during development. Starting with Java 9 instrumentation will be automatic, with no need for manual annotation anymore. |
In the meanwhile there's also a scanner task that will detect suspendables: http://docs.paralleluniverse.co/quasar/#advanced-fibers ("Automatic Instrumentation" sub-section). Pulsar (Quasar's bindings and idiomatic API for Clojure) also supports automatic instrumentation. |
So cool!!! |
That's not entirely up to us. We've helped with a small change to HotSpot that will make this possible. Oracle has not yet confirmed that the change will be merged in Java 9, but the chances are good. |
Hi all,
playing with quasar I found a strange and wrong behaviour.
Look at this simple unit test:
The AsyncApi is an asynchronous api that returns a CompletableFuture with the sum of two integers.
The SyncApi uses the AsyncCompletionStage.get() method to wrap the AsyncApi call.
When the test is executed, surprisingly, the result is:
As you can see the 'a' and 'b' variables are created twice and the related "system.out.println()" calls are also executed two times.
The expected output should have been:
Here a reproducer for the issue (clone and execute 'mvn clean test' to reproduce the issue):
https://github.com/ufoscout/quasar-test
My OS is ubuntu 15.04 and the JDK is:
java version "1.8.0_25"
Java(TM) SE Runtime Environment (build 1.8.0_25-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.25-b02, mixed mode)
The text was updated successfully, but these errors were encountered: