mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-13 15:05:33 +00:00
Fixed garbage AsyncTasks cannot be accessed
This commit is contained in:
parent
e6485c4734
commit
7861822a0f
@ -142,7 +142,7 @@ class AsyncPool{
|
|||||||
Timings::$schedulerAsyncTimer->startTiming();
|
Timings::$schedulerAsyncTimer->startTiming();
|
||||||
|
|
||||||
foreach($this->tasks as $task){
|
foreach($this->tasks as $task){
|
||||||
if($task->progressUpdates !== null){
|
if(!$task->isGarbage() and $task->progressUpdates !== null){
|
||||||
if($task->progressUpdates->count() !== 0){
|
if($task->progressUpdates->count() !== 0){
|
||||||
$progress = $task->progressUpdates->shift();
|
$progress = $task->progressUpdates->shift();
|
||||||
$task->onProgressUpdate($this->server, $progress);
|
$task->onProgressUpdate($this->server, $progress);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user