Open deripas opened 7 years ago
Wow, coincidence on the timing.
I've been using this library for 6 months and just realised I'm seeing the same thing and was about to raise an issue.
As far as I can see, this issue should be moved to https://github.com/jnr/jffi
It looks like ClosureMagazine.c
method closure_invoke(...)
needs to support configuring the behaviour of the thread attach/detach logic. Currently if possible to attach the thread before invocation it is always detached after invocation.
Yes this should be a jffi issue most likely, and I agree it should be fixed. We should do a round of patches.
The unfortunate part of having to change the C code is rebuilding the native library for all platforms, so this fix would require a pretty major release.
Any chance of getting a fix for this?
I have simple library with API:
Each callback call create a new java thread to handle the callback. How I can handle callback in fixed/single thread? In JNA can use CallbackThreadInitializer:
What analogy in JNR? Thank!