PHP code example of mitirrli / redis-queue
1. Go to this page and download the library: Download mitirrli/redis-queue library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
mitirrli / redis-queue example snippets
$Lock = new \Mitirrli\Queue\Queue(['key' => 'test', 'lLen' => 10]]);
$Lock->toList('a');
$Lock = new \Mitirrli\Lock\Lock(['key' => 'test']);
//业务逻辑占用锁
$Lock->lock();
//解锁
$Lock->unlock();