mirror of
https://github.com/songoda/SongodaCore.git
synced 2025-02-09 08:01:39 +01:00
Uses the asyncPool in DataManagerAbstract#asyncFuture
(#22)
This commit is contained in:
parent
7a85bd7a2a
commit
f6b091bb79
@ -81,7 +81,7 @@ public class DataManagerAbstract {
|
|||||||
public void async(Runnable runnable) {
|
public void async(Runnable runnable) {
|
||||||
Bukkit.getScheduler().runTaskAsynchronously(this.plugin, runnable);
|
Bukkit.getScheduler().runTaskAsynchronously(this.plugin, runnable);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Queue a task to be run asynchronously with all the
|
* Queue a task to be run asynchronously with all the
|
||||||
* advantages of CompletableFuture api <br>
|
* advantages of CompletableFuture api <br>
|
||||||
@ -89,7 +89,7 @@ public class DataManagerAbstract {
|
|||||||
* @param runnable task to run
|
* @param runnable task to run
|
||||||
*/
|
*/
|
||||||
public CompletableFuture<Void> asyncFuture(Runnable runnable) {
|
public CompletableFuture<Void> asyncFuture(Runnable runnable) {
|
||||||
return CompletableFuture.runAsync(runnable);
|
return CompletableFuture.runAsync(runnable, this.asyncPool);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user