mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-25 21:04:06 +00:00
Merge branch 'stable'
This commit is contained in:
commit
7139eccfbe
@ -50,10 +50,11 @@ final class MainLoggerThread extends \Thread{
|
||||
}
|
||||
|
||||
public function syncFlushBuffer() : void{
|
||||
$this->syncFlush = true;
|
||||
$this->synchronized(function() : void{
|
||||
$this->syncFlush = true;
|
||||
$this->notify(); //write immediately
|
||||
|
||||
});
|
||||
$this->synchronized(function() : void{
|
||||
while($this->syncFlush){
|
||||
$this->wait(); //block until it's all been written to disk
|
||||
}
|
||||
@ -95,7 +96,7 @@ final class MainLoggerThread extends \Thread{
|
||||
while(!$this->shutdown){
|
||||
$this->writeLogStream($logResource);
|
||||
$this->synchronized(function() : void{
|
||||
if(!$this->shutdown){
|
||||
if(!$this->shutdown && !$this->syncFlush){
|
||||
$this->wait();
|
||||
}
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user