mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-20 16:00:20 +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 $finished = null;
|
||||
protected $result = null;
|
||||
protected $taskId = null;
|
||||
|
||||
public function run(){
|
||||
$this->finished = false;
|
||||
@ -100,11 +101,14 @@ abstract class AsyncTask extends \Threaded{
|
||||
|
||||
/**
|
||||
* 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
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public abstract function onCompletion(Server $server);
|
||||
public function onCompletion(Server $server){
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user