Merge branch 'master' into mcpe-1.1

This commit is contained in:
Dylan K. Taylor
2017-05-18 11:29:52 +01:00
6 changed files with 33 additions and 6 deletions

View File

@ -234,7 +234,6 @@ namespace pocketmine {
}
return parse_offset($offset);
break;
case 'linux':
// Ubuntu / Debian.
if(file_exists('/etc/timezone')){
@ -261,7 +260,6 @@ namespace pocketmine {
}
return parse_offset($offset);
break;
case 'mac':
if(is_link('/etc/localtime')){
$filename = readlink('/etc/localtime');
@ -272,10 +270,8 @@ namespace pocketmine {
}
return false;
break;
default:
return false;
break;
}
}

View File

@ -136,6 +136,14 @@ class AsyncPool{
$this->taskWorkers = [];
$this->tasks = [];
$this->collectWorkers();
}
private function collectWorkers(){
foreach($this->workers as $worker){
$worker->collect();
}
}
public function collectTasks(){
@ -158,6 +166,8 @@ class AsyncPool{
}
}
$this->collectWorkers();
Timings::$schedulerAsyncTimer->stopTiming();
}
}

View File

@ -261,7 +261,8 @@ abstract class AsyncTask extends Collectable{
$this->{$p} = null;
}
}
}
$this->setGarbage();
}
}