mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-05 17:36:12 +00:00
Merge branch 'master' into mcpe-1.1
This commit is contained in:
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
@ -261,7 +261,8 @@ abstract class AsyncTask extends Collectable{
|
||||
$this->{$p} = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$this->setGarbage();
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user