Fixed #1501 executing AsyncTasks blocks other threads

This commit is contained in:
Shoghi Cervantes
2014-06-22 12:50:24 +02:00
parent e381313747
commit 7f795bc041
5 changed files with 42 additions and 110 deletions

View File

@ -24,10 +24,13 @@ namespace pocketmine\scheduler;
class AsyncWorker extends \Worker{
public $path;
public function start($options = PTHREADS_INHERIT_CLASSES){
public function __construct(){
$this->path = \pocketmine\PATH;
return parent::start(PTHREADS_INHERIT_ALL & ~PTHREADS_INHERIT_CLASSES);
}
public function start(){
return parent::start($options & ~PTHREADS_INHERIT_CLASSES);
}
public function run(){