grei/queue

This package is abandoned and no longer maintained. No replacement package was suggested.

PHP in memory FIFO queue

0.1 2018-12-29 20:32 UTC

This package is auto-updated.

Last update: 2021-07-13 19:30:51 UTC


README

Fifo queues implement with php shmop.

this library can be used in pcntl_fork, worker etc.

usage

<?php
$q = new Grei\Queue($byte); // default 1000000 byte
$q->enqueue($item); // add item to queue
$q->dequeue(); // remove one item
$q->isEmpty(); // check if queue empty or not
$q->get(); // get one item and trigger dequeue
$q->items(); // list all queue items
$q->close(); // close queue/shmop memory

this library also available as composer packages

composer require grei/queue