Skip to content

Commit

Permalink
Rollback temp change and add clarifying comments
Browse files Browse the repository at this point in the history
  • Loading branch information
jmao-denver committed Oct 24, 2024
1 parent 2cb3314 commit fe97888
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ def test_python_with_java_classes(self):
def test_java(self):
assert test_maven()

# suite.addTest(test_python_with_java_runtime)
suite.addTest(test_python_with_java_runtime)
suite.addTest(test_python_with_java_classes)
# comment out because the asynchronous nature of the PyObject GC in Java makes stopPython/startPython flakey.
# suite.addTest(test_java)
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/org/jpy/PyObjectReferences.java
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,8 @@ def cleanup(references):
sleep_time = 0.1 if size == 1024 else 1.0
time.sleep(sleep_time)
*/
// try-catch block to handle PyLib not initialized exception when a race condition occurs in the free-threaded
// mode that the cleanup thread starts running after Python is already finalized.
try {
final PyObjectCleanup proxy = asProxy();

Expand Down

0 comments on commit fe97888

Please sign in to comment.