mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-06 01:51:51 +00:00
Made AsyncTask::onCompletion() implementation optional
This commit is contained in:
parent
76cd164aa4
commit
fee7f5060b
@ -32,6 +32,7 @@ abstract class AsyncTask extends \Threaded{
|
|||||||
protected $complete = null;
|
protected $complete = null;
|
||||||
protected $finished = null;
|
protected $finished = null;
|
||||||
protected $result = null;
|
protected $result = null;
|
||||||
|
protected $taskId = null;
|
||||||
|
|
||||||
public function run(){
|
public function run(){
|
||||||
$this->finished = false;
|
$this->finished = false;
|
||||||
@ -100,11 +101,14 @@ abstract class AsyncTask extends \Threaded{
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Actions to execute when completed (on main thread)
|
* Actions to execute when completed (on main thread)
|
||||||
|
* Implement this if you want to handle the data in your AsyncTask after it has been processed
|
||||||
*
|
*
|
||||||
* @param Server $server
|
* @param Server $server
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public abstract function onCompletion(Server $server);
|
public function onCompletion(Server $server){
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user