仓库初始化
This commit is contained in:
34
addons/crontab/library/SimpleFork/Queue/QueueInterface.php
Normal file
34
addons/crontab/library/SimpleFork/Queue/QueueInterface.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
/**
|
||||
* Created by PhpStorm.
|
||||
* User: Jenner
|
||||
* Date: 2015/8/12
|
||||
* Time: 15:11
|
||||
*/
|
||||
|
||||
namespace Jenner\SimpleFork\Queue;
|
||||
|
||||
|
||||
/**
|
||||
* queue for processes to transfer data
|
||||
*
|
||||
* @package Jenner\SimpleFork\Queue
|
||||
*/
|
||||
interface QueueInterface
|
||||
{
|
||||
/**
|
||||
* put value into the queue of channel
|
||||
*
|
||||
* @param $value
|
||||
* @return bool
|
||||
*/
|
||||
public function put($value);
|
||||
|
||||
/**
|
||||
* get value from the queue of channel
|
||||
*
|
||||
* @param bool $block if block when the queue is empty
|
||||
* @return bool|string
|
||||
*/
|
||||
public function get($block = false);
|
||||
}
|
||||
Reference in New Issue
Block a user