Use Collectable class on AsyncTask, removed task collection workaround on ServerScheduler

This commit is contained in:
Shoghi Cervantes
2014-10-10 20:53:28 +02:00
parent 8b585fd9f7
commit 0dba14074a
3 changed files with 3 additions and 13 deletions

View File

@ -28,7 +28,7 @@ use pocketmine\Server;
*
* WARNING: Do not call PocketMine-MP API methods from other Threads!!
*/
abstract class AsyncTask extends \Threaded{
abstract class AsyncTask extends \Collectable{
protected $complete = null;
protected $finished = null;
@ -43,6 +43,7 @@ abstract class AsyncTask extends \Threaded{
$this->onRun();
$this->finished = true;
$this->setGarbage();
}