add async library documentation

This commit is contained in:
FalsePattern committed 2022-06-10 03:00:23 +02:00
1 parent 4f12582a41
commit 5cc487f9a9
2 files changed
+6

No files matched your search

+1
View File
@@ -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) -> {