You've already forked qlg.tsgz.moe
Init Repo
This commit is contained in:
14
vendor/swoole/examples/ringqueue.php
vendored
Executable file
14
vendor/swoole/examples/ringqueue.php
vendored
Executable file
@ -0,0 +1,14 @@
|
||||
<?php
|
||||
$q = new Swoole\RingQueue(10);
|
||||
|
||||
for ($i = 0; $i < 12; $i++)
|
||||
{
|
||||
$ret = $q->push("hello_" . $i);
|
||||
var_dump($ret, $q->isFull(), $q->count());
|
||||
}
|
||||
|
||||
for ($i = 0; $i < 12; $i++)
|
||||
{
|
||||
$ret = $q->pop();
|
||||
var_dump($ret, $q->isEmpty(), $q->count());
|
||||
}
|
Reference in New Issue
Block a user