Пример #1
0
def detachThreadFromJVM():
    """ Detaches a thread from the JVM.

    This function detaches the thread and frees the associated resource in
    the JVM. For codes making heavy use of threading this should be used
    to prevent resource leaks. The thread can be reattached, so there
    is no harm in detaching early or more than once. This method cannot fail
    and there is no harm in calling it when the JVM is not running.
    """
    _jpype.detachThreadFromJVM()
Пример #2
0
def detachThreadFromJVM():
    _jpype.detachThreadFromJVM()
Пример #3
0
def detachThreadFromJVM() :
    _jpype.detachThreadFromJVM()
Пример #4
0
 def testDetachThread(self):
     self.assertTrue(_jpype.isThreadAttachedToJVM())
     _jpype.detachThreadFromJVM()
     self.assertFalse(_jpype.isThreadAttachedToJVM())
     _jpype.attachThreadToJVM()
Пример #5
0
 def testDetachThreadFault(self):
     _jpype.fault("PyJPModule_detachThread")
     with self.assertRaisesRegex(SystemError, "fault"):
         _jpype.detachThreadFromJVM()