Skip to content

Commit 30199d2

Browse files
committed
when forcing a GC, also sleep a little
1 parent daa322e commit 30199d2

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/modules/GcModuleBuiltins.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,11 @@ int collect(@SuppressWarnings("unused") Object level,
7373
gil.release(true);
7474
try {
7575
PythonUtils.forceFullGC();
76+
try {
77+
Thread.sleep(15);
78+
} catch (InterruptedException e) {
79+
// doesn't matter, just trying to give the GC more time
80+
}
7681
} finally {
7782
gil.acquire();
7883
}

0 commit comments

Comments
 (0)