mirror of
https://github.com/Minestom/Minestom.git
synced 2024-12-30 21:17:53 +01:00
Cleanup un-needed changes
This commit is contained in:
parent
85ca2a5302
commit
b1b1e70c40
@ -184,9 +184,9 @@ public final class SchedulerManager implements IExtensionObserver {
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the execution service for all the registered {@link Task}, which are not marked as thread-bound.
|
||||
* Gets the execution service for all the registered {@link Task}
|
||||
*
|
||||
* @return the execution service for all the registered {@link Task}, which are not marked as thread-bound
|
||||
* @return the execution service for all the registered {@link Task}
|
||||
*/
|
||||
@NotNull
|
||||
public ExecutorService getBatchesPool() {
|
||||
|
@ -43,8 +43,6 @@ public class Task implements Runnable {
|
||||
private ScheduledFuture<?> future;
|
||||
// The thread of the task
|
||||
private volatile Thread currentThreadTask;
|
||||
// The executor service used for this task
|
||||
private final ExecutorService executorService;
|
||||
|
||||
/**
|
||||
* Creates a task.
|
||||
@ -60,7 +58,6 @@ public class Task implements Runnable {
|
||||
this.runnable = runnable;
|
||||
this.shutdown = shutdown;
|
||||
this.id = shutdown ? this.schedulerManager.getShutdownCounterIdentifier() : this.schedulerManager.getCounterIdentifier();
|
||||
this.executorService = this.schedulerManager.getBatchesPool();
|
||||
this.delay = delay;
|
||||
this.repeat = repeat;
|
||||
this.isTransient = isTransient;
|
||||
@ -72,7 +69,7 @@ public class Task implements Runnable {
|
||||
*/
|
||||
@Override
|
||||
public void run() {
|
||||
executorService.execute(() -> {
|
||||
this.schedulerManager.getBatchesPool().execute(() -> {
|
||||
this.currentThreadTask = Thread.currentThread();
|
||||
try {
|
||||
this.runnable.run();
|
||||
|
Loading…
Reference in New Issue
Block a user