From fee7f5060b218352a0e143834881125bafc77912 Mon Sep 17 00:00:00 2001 From: Shoghi Cervantes Date: Sun, 10 Aug 2014 18:15:06 +0200 Subject: [PATCH] Made AsyncTask::onCompletion() implementation optional --- src/pocketmine/scheduler/AsyncTask.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/pocketmine/scheduler/AsyncTask.php b/src/pocketmine/scheduler/AsyncTask.php index 659224b59..31b73400e 100644 --- a/src/pocketmine/scheduler/AsyncTask.php +++ b/src/pocketmine/scheduler/AsyncTask.php @@ -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){ + + } }