mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-07 10:22:56 +00:00
Added AsyncTask::onCompletion()
This commit is contained in:
@ -20,6 +20,7 @@
|
||||
*/
|
||||
|
||||
namespace pocketmine\scheduler;
|
||||
use pocketmine\Server;
|
||||
|
||||
/**
|
||||
* Class used to run async tasks in other threads.
|
||||
@ -91,4 +92,13 @@ abstract class AsyncTask extends \Threaded{
|
||||
*/
|
||||
public abstract function onRun();
|
||||
|
||||
/**
|
||||
* Actions to execute when completed (on main thread)
|
||||
*
|
||||
* @param Server $server
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public abstract function onCompletion(Server $server);
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user