Skip to content

Commit

Permalink
Make the sync worker thread a deamon thread (#117)
Browse files Browse the repository at this point in the history
  • Loading branch information
Technici4n authored Apr 19, 2024
1 parent 2272d7b commit fdf16c3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion loader/src/main/java/net/neoforged/fml/ModWorkManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,11 @@
public class ModWorkManager {
private static final Logger LOGGER = LogManager.getLogger();

private static final Executor syncWorkExecutor = Executors.newSingleThreadExecutor(r -> new Thread(r, "modloading-sync-worker"));
private static final Executor syncWorkExecutor = Executors.newSingleThreadExecutor(r -> {
var thread = new Thread(r, "modloading-sync-worker");
thread.setDaemon(true);
return thread;
});

/**
* Executor that runs tasks on a single thread in the order they are submitted.
Expand Down

0 comments on commit fdf16c3

Please sign in to comment.