Created
February 17, 2020 00:15
-
-
Save mkitti/704e9e07ea217c9a096d43e9433d8b0d to your computer and use it in GitHub Desktop.
JavaCall does not work well with @async
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using JavaCall; | |
println("I threw a wish in the well ...") | |
JavaCall.init() | |
println("Hey, I just met you and this is crazy") | |
jls = @jimport java.lang.System | |
version = jcall(jls,"getProperty",JString,(JString,),"java.version") | |
println("Java Version: ",version) | |
jlm = @jimport java.lang.Math | |
@async begin | |
println("But here's my number, so call me maybe") | |
sin90 = jcall(jlm, "sin", jdouble, (jdouble,), pi/2) | |
println("sin(90) = ",sin90) | |
sin45 = jcall(jlm, "sin", jdouble, (jdouble,), pi/4) | |
println("sin(45) = ",sin45) | |
println("It's hard to look right at you baby") | |
end | |
sleep(3) | |
println("You took your time with the call") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using JavaCall; | |
println("I threw a wish in the well ...") | |
@async begin | |
println("Hey, I just met you and this is crazy") | |
JavaCall.init() | |
println("But here's my number, so call me maybe") | |
jls = @jimport java.lang.System | |
version = jcall(jls,"getProperty",JString,(JString,),"java.version") | |
println("Java Version: ",version) | |
jlm = @jimport java.lang.Math | |
sin90 = jcall(jlm, "sin", jdouble, (jdouble,), pi/2) | |
println("sin(90) = ",sin90) | |
sin45 = jcall(jlm, "sin", jdouble, (jdouble,), pi/4) | |
println("sin(45) = ",sin45) | |
println("It's hard to look right at you baby") | |
end | |
sleep(3) | |
println("You took your time with the call") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment