mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-07 04:17:07 +00:00
AsyncPool: silence a warning about wrong key type
getTaskId() returns int|null, although it won't happen after the ID has been set.
This commit is contained in:
parent
bc985198a0
commit
5571ae05b5
@ -162,13 +162,14 @@ class AsyncPool{
|
||||
}
|
||||
|
||||
$task->progressUpdates = new \Threaded;
|
||||
$task->setTaskId($this->nextTaskId++);
|
||||
$taskId = $this->nextTaskId++;
|
||||
$task->setTaskId($taskId);
|
||||
|
||||
$this->tasks[$task->getTaskId()] = $task;
|
||||
$this->tasks[$taskId] = $task;
|
||||
|
||||
$this->getWorker($worker)->stack($task);
|
||||
$this->workerUsage[$worker]++;
|
||||
$this->taskWorkers[$task->getTaskId()] = $worker;
|
||||
$this->taskWorkers[$taskId] = $worker;
|
||||
$this->workerLastUsed[$worker] = time();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user