mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 09:56:06 +00:00
Fixed pthreads crashes with progressUpdates
This commit is contained in:
@ -142,11 +142,8 @@ class AsyncPool{
|
||||
Timings::$schedulerAsyncTimer->startTiming();
|
||||
|
||||
foreach($this->tasks as $task){
|
||||
if(!$task->isGarbage() and $task->progressUpdates !== null){
|
||||
if($task->progressUpdates->count() !== 0){
|
||||
$progress = $task->progressUpdates->shift();
|
||||
$task->onProgressUpdate($this->server, $progress);
|
||||
}
|
||||
if(!$task->isGarbage()){
|
||||
$task->checkProgressUpdates($this->server);
|
||||
}
|
||||
if($task->isGarbage() and !$task->isRunning() and !$task->isCrashed()){
|
||||
if(!$task->hasCancelledRun()){
|
||||
|
Reference in New Issue
Block a user