swoole / swoole-src

🚀 Coroutine-based concurrency library for PHP
https://www.swoole.com
Apache License 2.0
18.41k stars 3.16k forks source link

Swoole\Thread\ArrayList和Queue 是否可以考虑下清空并返回剩余的数据? #5487

Closed LIngMax closed 2 hours ago

LIngMax commented 2 hours ago

Swoole\Thread\Map()->clean(): void Swoole\Thread\ArrayList()->clean() Swoole\Thread\Queue()->clean(): void ArrayList和Queue 清空返回剩余的数据

matyhtf commented 2 hours ago

Map 和 ArrayList 可以使用 toArray 转为数组。Queue 无法遍历