Added settings.async-workers to tune the amount of AsyncTask workers

This commit is contained in:
Shoghi Cervantes
2014-06-22 12:55:08 +02:00
parent 7f795bc041
commit bf49cafeae
4 changed files with 9 additions and 8 deletions

View File

@ -24,13 +24,10 @@ namespace pocketmine\scheduler;
class AsyncWorker extends \Worker{
public $path;
public function __construct(){
public function start($options = PTHREADS_INHERIT_ALL){
$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(){