Is it safe to have multiple versions of the jni
crate in use within a single application?
#422
Milestone
jni
crate in use within a single application?
#422
This issue is really just a reminder to take some care to consider how safe it is to have multiple versions of the
jni
crate linked in a single application.I don't currently know of any specific problem but it's something that's crossed my mind a number of times recently and I expect that it might not have been considered carefully before, so I don't feel confident that I understand the safety concerns (if any).
The use of TLS for attaching threads is probably the main thing that I wonder about.
Multiple versions of the
jni
crate will effectively have their own TLS state and maybe they could end up with a muddled understanding of which threads are attached to the JVM? - is that a safety concern?Is there any static state, or other TLS usage to consider?
The text was updated successfully, but these errors were encountered: