Another fix for the JVM hanging on exit problem when using directors
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10550 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
3463ced917
commit
a1590359c9
3 changed files with 21 additions and 2 deletions
|
|
@ -3450,6 +3450,14 @@ DirectorDerived::upcall_method() invoked.
|
|||
</pre>
|
||||
</div>
|
||||
|
||||
<H3><a name="java_directors_threading"></a>Director threading issues</H3>
|
||||
|
||||
<p>
|
||||
Depending on your operating system and version of Java and how you are using threads, you might find the JVM hangs on exit.
|
||||
There are a couple of solutions to try out. The preferred solution requires jdk-1.4 and later and uses <tt>AttachCurrentThreadAsDaemon</tt> instead of <tt>AttachCurrentThread</tt> whenever a call into the JVM is required. This can be enabled by defining the SWIG_JAVA_ATTACH_CURRENT_THREAD_AS_DAEMON macro when compiling the C++ wrapper code. For older JVMs define SWIG_JAVA_NO_DETACH_CURRENT_THREAD instead, to avoid the <tt>DetachCurrentThread</tt> call but this will result in a memory leak instead. For further details inspect the source code in the java/director.swg library file.
|
||||
</p>
|
||||
|
||||
|
||||
<H2><a name="java_allprotected"></a>20.6 Accessing protected members</H2>
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue