redis List 并发问题
天蓬老师
天蓬老师 2017-04-24 09:12:21
0
3
685

现在c端单线程rpush数据到redis ,我java端用的是hiredis client,能否多线程lpop数据,多线程lpop是否会出现重复pop到同一个数据啊?

天蓬老师
天蓬老师

欢迎选择我的课程,让我们一起见证您的进步~~

reply all(3)
小葫芦

Redis is single-threaded, that is, the server side is single-threaded to handle all client requests, so your multiple client requests are executed serially one by one.

Ty80

Obviously not. pop is an atomic operation.

Peter_Zhu

There is blpop.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template