mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-12 22:45:28 +00:00
AsyncPool: fixed stable merge error
This commit is contained in:
parent
23e5ade77e
commit
f5e033ad5d
@ -25,6 +25,7 @@ namespace pocketmine\scheduler;
|
|||||||
|
|
||||||
use pocketmine\utils\Utils;
|
use pocketmine\utils\Utils;
|
||||||
use function array_keys;
|
use function array_keys;
|
||||||
|
use function array_map;
|
||||||
use function assert;
|
use function assert;
|
||||||
use function count;
|
use function count;
|
||||||
use function spl_object_id;
|
use function spl_object_id;
|
||||||
@ -269,7 +270,7 @@ class AsyncPool{
|
|||||||
* @phpstan-return array<int, int>
|
* @phpstan-return array<int, int>
|
||||||
*/
|
*/
|
||||||
public function getTaskQueueSizes() : array{
|
public function getTaskQueueSizes() : array{
|
||||||
return $this->workerUsage;
|
return array_map(function(\SplQueue $queue) : int{ return $queue->count(); }, $this->taskQueues);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function shutdownUnusedWorkers() : int{
|
public function shutdownUnusedWorkers() : int{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user