现在c端单线程rpush数据到redis ,我java端用的是hiredis client,能否多线程lpop数据,多线程lpop是否会出现重复pop到同一个数据啊?
欢迎选择我的课程,让我们一起见证您的进步~~
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.
Obviously not. pop is an atomic operation.
There is blpop.
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.
Obviously not. pop is an atomic operation.
There is blpop.