mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-26 18:03:51 -07:00
@@ -76,7 +76,7 @@ public interface BukkitScheduler {
|
||||
/**
|
||||
* Calls a method on the main thread and returns a Future object
|
||||
* This task will be executed by the main server thread
|
||||
*
|
||||
* <p />
|
||||
* Note: The Future.get() methods must NOT be called from the main thread
|
||||
* Note2: There is at least an average of 10ms latency until the isDone() method returns true
|
||||
*
|
||||
@@ -108,33 +108,33 @@ public interface BukkitScheduler {
|
||||
|
||||
/**
|
||||
* Check if the task currently running.
|
||||
*
|
||||
* <p />
|
||||
* A repeating task might not be running currently, but will be running in the future.
|
||||
* A task that has finished, and does not repeat, will not be running ever again.
|
||||
*
|
||||
* <p />
|
||||
* Explicitly, a task is running if there exists a thread for it, and that thread is alive.
|
||||
*
|
||||
* @param taskId The task to check.
|
||||
*
|
||||
* <p />
|
||||
* @return If the task is currently running.
|
||||
*/
|
||||
public boolean isCurrentlyRunning(int taskId);
|
||||
|
||||
/**
|
||||
* Check if the task queued to be run later.
|
||||
*
|
||||
* <p />
|
||||
* If a repeating task is currently running, it might not be queued now but could be in the future.
|
||||
* A task that is not queued, and not running, will not be queued again.
|
||||
*
|
||||
* @param taskId The task to check.
|
||||
*
|
||||
* <p />
|
||||
* @return If the task is queued to be run.
|
||||
*/
|
||||
public boolean isQueued(int taskId);
|
||||
|
||||
/**
|
||||
* Returns a list of all active workers.
|
||||
*
|
||||
* <p />
|
||||
* This list contains asynch tasks that are being executed by separate threads.
|
||||
*
|
||||
* @return Active workers
|
||||
|
@@ -5,7 +5,7 @@ import org.bukkit.plugin.Plugin;
|
||||
/**
|
||||
* Represents a worker thread for the scheduler. This gives information about
|
||||
* the Thread object for the task, owner of the task and the taskId.
|
||||
*
|
||||
* </p>
|
||||
* Workers are used to execute async tasks.
|
||||
*/
|
||||
|
||||
|
Reference in New Issue
Block a user