Skip to content

Commit

Permalink
Improve robustness of initial cleanup (fixes #255)
Browse files Browse the repository at this point in the history
  • Loading branch information
gnodet committed Aug 25, 2023
1 parent c3ac54f commit cdb8d8c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/main/java/org/fusesource/jansi/internal/JansiLoader.java
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,10 @@ public class JansiLoader {
public static synchronized boolean initialize() {
// only cleanup before the first extract
if (!loaded) {
cleanup();
Thread cleanup = new Thread(JansiLoader::cleanup, "cleanup");
cleanup.setPriority(Thread.MIN_PRIORITY);
cleanup.setDaemon(true);
cleanup.start();
}
try {
loadJansiNativeLibrary();
Expand Down

0 comments on commit cdb8d8c

Please sign in to comment.