-
Notifications
You must be signed in to change notification settings - Fork 157
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix update checker promoting downgrades, other followup improvements (#…
…716) - Fixed update checker promoting downgrades
- Loading branch information
Showing
8 changed files
with
254 additions
and
106 deletions.
There are no files selected for viewing
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
17 changes: 0 additions & 17 deletions
17
src/main/java/com/terraformersmc/modmenu/util/UpdateCheckerThread.java
This file was deleted.
Oops, something went wrong.
16 changes: 16 additions & 0 deletions
16
src/main/java/com/terraformersmc/modmenu/util/UpdateCheckerThreadFactory.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,16 @@ | ||
package com.terraformersmc.modmenu.util; | ||
|
||
import org.jetbrains.annotations.NotNull; | ||
|
||
import java.util.concurrent.ThreadFactory; | ||
import java.util.concurrent.atomic.AtomicInteger; | ||
|
||
public class UpdateCheckerThreadFactory implements ThreadFactory { | ||
static final AtomicInteger COUNT = new AtomicInteger(-1); | ||
|
||
@Override | ||
public Thread newThread(@NotNull Runnable r) { | ||
var index = COUNT.incrementAndGet(); | ||
return Thread.ofVirtual().name("ModMenu/Update Checker/%s".formatted(index)).unstarted(r); | ||
} | ||
} |
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
Oops, something went wrong.