Skip to content

Commit

Permalink
Sleep 1 s
Browse files Browse the repository at this point in the history
  • Loading branch information
baibaichen committed Jul 1, 2024
1 parent ae2d125 commit f41cb66
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import org.apache.gluten.exception.GlutenException;

import org.apache.spark.util.GlutenShutdownManager;
import org.apache.spark.util.Utils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Expand Down Expand Up @@ -77,6 +78,13 @@ public class JniLibLoader {
}

public static synchronized void forceUnloadAll() {
if (Utils.isTesting()) {
try {
Thread.sleep(1000);
} catch (InterruptedException e) {
throw new RuntimeException(e);
}
}
List<String> loaded = new ArrayList<>(REQUIRE_UNLOAD_LIBRARY_PATHS);
Collections.reverse(loaded); // use reversed order to unload
loaded.forEach(JniLibLoader::unloadFromPath);
Expand Down

0 comments on commit f41cb66

Please sign in to comment.