Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Compatibility with Threads? #131
Comments
Did you set the environmental variable |
Oh, you're on Windows... hmm. Also we may need to do something with |
I'm going to drop some hints here. Essentially to get this to work, you'll have to tap the lower level JNI interface in JavaCall: using JavaCall
JavaCall.init()
# The following is a pointer to the AttachCurrentThread function of the JVM. Use ccall or @ccall to call that.
JavaCall.JNI.jvmfunc[].AttachCurrentThread The C definition of that is jint AttachCurrentThread(JavaVM *vm, void **p_env, void *thr_args); The call to that is going to look a lot like So something like:
When using JavaCall from a new thread: empty!(JavaCall._jmc_cache) # You might need to do @jimport anew
JavaCall.JNI.ppenv[] = ppenv_this_thread[] There are synchronization issues there. The real solution is to to figure out the new thread specific
|
I started an experimental branch to push multithreading forwards on Linux / MacOS: |
Trying to run jcall in a separate thread kills the julia session: