mirror of
https://github.com/FalsePattern/FalsePatternLib.git
synced 2026-11-16 14:14:52 +00:00
add async library documentation
This commit is contained in:
2 files changed
+6
No files matched your search
@@ -15,6 +15,7 @@ The contents of the [util](src/main/java/com/falsepattern/lib/util) package so f
|
||||
| Class | Purpose |
|
||||
|---------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------|
|
||||
| [ResourceUtil](src/main/java/com/falsepattern/lib/util/ResourceUtil.java) | Provides methods for efficiently retrieving resources from SPECIFIC jar files instead of the entire classpath |
|
||||
| [Async](src/main/java/com/falsepattern/lib/util/Async.java) | Provides asynchronous execution utilities. |
|
||||
|
||||
|
||||
Anything annotated with [@StableAPI](src/main/java/com/falsepattern/lib/StableAPI.java) is guaranteed to not change in patch versions.
|
||||
|
||||
@@ -7,6 +7,11 @@ import lombok.Getter;
|
||||
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!
|
||||
*/
|
||||
@StableAPI(since = "0.8.0")
|
||||
public class Async {
|
||||
public static final ExecutorService asyncWorker = Executors.newSingleThreadExecutor((runnable) -> {
|
||||
|
||||
Reference in new issue
Block a user