mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-22 16:51:42 +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");
|
||||
|
||||
$killer = new ServerKiller(8);
|
||||
$killer->start();
|
||||
$killer->start(PTHREADS_INHERIT_NONE);
|
||||
usleep(10000); //Fixes ServerKiller not being able to start on single-core machines
|
||||
|
||||
if(ThreadManager::getInstance()->stopAll() > 0){
|
||||
|
@ -34,6 +34,7 @@ class ServerKiller extends Thread{
|
||||
}
|
||||
|
||||
public function run(){
|
||||
$this->registerClassLoader();
|
||||
$start = time();
|
||||
$this->synchronized(function(){
|
||||
$this->wait($this->time * 1000000);
|
||||
|
Loading…
x
Reference in New Issue
Block a user