业务需要,Redis如何高效的实现阻塞队列?
Redis似乎没有像java中linkedblocking queue那样的实现,
只有blpop的阻塞版本,入队的操作需要自己控制阻塞吗
阿神2017-04-24 09:14:45
The blocking queue is blocked when leaving the queue, but there is no blocking when entering the queue. BLPOP and Java's BlockingQueue are similar in use.
PHP中文网2017-04-24 09:14:45
Since the queue length of Redis is infinite, joining the queue must be successful, and there is no such thing as queue joining blocking.
And leaving the queue is blocked