mirror of
https://github.com/FalsePattern/FalsePatternLib.git
synced 2026-11-15 10:14:45 +00:00
get rid of AsyncUtil. ripbozo
This commit is contained in:
2 files changed
-24
No files matched your search
@@ -14,7 +14,6 @@ The contents of the [util](src/main/java/com/falsepattern/lib/util) package so f
|
||||
|
||||
| Class | Purpose |
|
||||
|---------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------|
|
||||
| [AsyncUtil](src/main/java/com/falsepattern/lib/util/AsyncUtil.java) | Asynchronous execution utilities |
|
||||
| [FileUtil](src/main/java/com/falsepattern/lib/util/FileUtil.java) | Directory and file utilities. |
|
||||
| [LangUtil](src/main/java/com/falsepattern/lib/util/LangUtil.java) | Utility for having default language values defined inside code instead of lang files |
|
||||
| [RenderUtil](src/main/java/com/falsepattern/lib/util/RenderUtil.java) | Rendering tools. Currently, the only thing implemented is a way to grab the current partial tick time from the minecraft instance |
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
package com.falsepattern.lib.util;
|
||||
|
||||
import com.falsepattern.lib.internal.Tags;
|
||||
|
||||
import java.util.concurrent.ExecutorService;
|
||||
import java.util.concurrent.Executors;
|
||||
|
||||
/**
|
||||
* Asynchronous utilities. Notice: you should not abuse this for anything performance-sensitive.
|
||||
* The asynchronous worker exists primarily to run code independently of the main thread during loading.
|
||||
* You must make sure to solve any potential deadlocks yourself!
|
||||
*
|
||||
* //Deprecated since 0.9.0, removal in 0.10+: Use java-provided async tools instead. CompletableFuture is a nice one.
|
||||
*/
|
||||
@Deprecated
|
||||
public class AsyncUtil {
|
||||
public static final ExecutorService asyncWorker = Executors.newSingleThreadExecutor((runnable) -> {
|
||||
Thread thread = new Thread(runnable);
|
||||
thread.setDaemon(true);
|
||||
thread.setName(Tags.MODNAME + " Async Worker");
|
||||
return thread;
|
||||
});
|
||||
}
|
||||
Reference in new issue
Block a user