redis阻塞队列的实现
巴扎黑
巴扎黑 2017-04-24 09:12:45
0
2
636

业务需要,Redis如何高效的实现阻塞队列?
Redis似乎没有像java中linkedblocking queue那样的实现,
只有blpop的阻塞版本,入队的操作需要自己控制阻塞吗

巴扎黑
巴扎黑

reply all(2)
阿神

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.

洪涛

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

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!