-
-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Propagate context classloader to default forkjoin thread factory
Patch mixin conflicts related to Slight GUI Modifications Fixes #269
- Loading branch information
Showing
3 changed files
with
21 additions
and
0 deletions.
There are no files selected for viewing
13 changes: 13 additions & 0 deletions
13
src/main/java/dev/su5ed/sinytra/connector/service/ConnectorForkJoinThreadFactory.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package dev.su5ed.sinytra.connector.service; | ||
|
||
import java.util.concurrent.ForkJoinPool; | ||
import java.util.concurrent.ForkJoinWorkerThread; | ||
|
||
public class ConnectorForkJoinThreadFactory implements ForkJoinPool.ForkJoinWorkerThreadFactory { | ||
@Override | ||
public ForkJoinWorkerThread newThread(ForkJoinPool pool) { | ||
ForkJoinWorkerThread thread = ForkJoinPool.defaultForkJoinWorkerThreadFactory.newThread(pool); | ||
thread.setContextClassLoader(Thread.currentThread().getContextClassLoader()); | ||
return thread; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters