This commit is contained in:
2023-04-03 00:56:22 +08:00
parent 00efca071f
commit 709e35f4dc
+4 -4
View File
@@ -16,11 +16,11 @@ class PoolQueue implements QueueInterface
*/
public function __construct(public int $max)
{
// if (Context::inCoroutine()) {
if (Context::inCoroutine()) {
$this->queue = new Channel($this->max);
// } else {
// $this->queue = new SplQueue($this->max);
// }
} else {
$this->queue = new SplQueue($this->max);
}
}