• 请不要在回答技术问题时复制粘贴 AI 生成的内容
mortonnex
V2EX  ›  程序员

redis 的 brpop 是线程安全的吗

  •  
  •   mortonnex · Jan 11, 2018 · 2421 views
    This topic created in 3082 days ago, the information mentioned may be changed or developed.
    我用多线程,每个线程都去 brpop 同一队列

    会有线程安全的问题吗
    sagaxu
        1
    sagaxu  
       Jan 11, 2018
    redis 是单线程的,如何做到线程不安全?
    mortonnex
        2
    mortonnex  
    OP
       Jan 11, 2018
    @sagaxu 我的意思是消费者 多线程
    mortonnex
        3
    mortonnex  
    OP
       Jan 11, 2018
    @sagaxu 明白了...pop 是原子操作
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2546 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 34ms · UTC 08:04 · PVG 16:04 · LAX 01:04 · JFK 04:04
    ♥ Do have faith in what you're doing.