mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-11 14:05:35 +00:00
Merge remote-tracking branch 'origin/stable'
This commit is contained in:
commit
7684dc03fa
@ -59,8 +59,10 @@ final class MainLoggerThread extends \Thread{
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function shutdown() : void{
|
public function shutdown() : void{
|
||||||
$this->shutdown = true;
|
$this->synchronized(function() : void{
|
||||||
$this->notify();
|
$this->shutdown = true;
|
||||||
|
$this->notify();
|
||||||
|
});
|
||||||
$this->join();
|
$this->join();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -90,7 +92,9 @@ final class MainLoggerThread extends \Thread{
|
|||||||
while(!$this->shutdown){
|
while(!$this->shutdown){
|
||||||
$this->writeLogStream($logResource);
|
$this->writeLogStream($logResource);
|
||||||
$this->synchronized(function() : void{
|
$this->synchronized(function() : void{
|
||||||
$this->wait();
|
if(!$this->shutdown){
|
||||||
|
$this->wait();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user