mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-30 23:29:54 +00:00
Most pointless optimization ever (ServerKiller)
This commit is contained in:
parent
d7a02793fa
commit
e7b2dc87d6
@ -307,7 +307,7 @@ namespace pocketmine {
|
|||||||
$logger->info("Stopping other threads");
|
$logger->info("Stopping other threads");
|
||||||
|
|
||||||
$killer = new ServerKiller(8);
|
$killer = new ServerKiller(8);
|
||||||
$killer->start();
|
$killer->start(PTHREADS_INHERIT_NONE);
|
||||||
usleep(10000); //Fixes ServerKiller not being able to start on single-core machines
|
usleep(10000); //Fixes ServerKiller not being able to start on single-core machines
|
||||||
|
|
||||||
if(ThreadManager::getInstance()->stopAll() > 0){
|
if(ThreadManager::getInstance()->stopAll() > 0){
|
||||||
|
@ -34,6 +34,7 @@ class ServerKiller extends Thread{
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function run(){
|
public function run(){
|
||||||
|
$this->registerClassLoader();
|
||||||
$start = time();
|
$start = time();
|
||||||
$this->synchronized(function(){
|
$this->synchronized(function(){
|
||||||
$this->wait($this->time * 1000000);
|
$this->wait($this->time * 1000000);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user