Is there any plan to support a BLPUSH command that will block until the length of a list drops below max_size? In producer-consumer pattern, BLPUSH can be used to prevent the list from growing indefinitely if the producer runs faster than the consumer. Python has a very similar feature: Queue.put().
Can I implement it myself in Lua? I don't know how to achieve the "blocking" effect as in BRPOP without freezing up Redis.
Comment From: badboy
Blocking is not possible in Lua scripts.
Comment From: itamarhaber
Blocking is possible, however, with Redis modules ( https://redis.io/topics/modules-blocking-ops).
On Tue, Nov 7, 2017 at 10:39 AM, Jan-Erik Rediger notifications@github.com wrote:
Blocking is not possible in Lua scripts.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/antirez/redis/issues/4425#issuecomment-342412243, or mute the thread https://github.com/notifications/unsubscribe-auth/AFx1_ETZKXQ5vG1Jyo9pl-PIU70DlJBLks5s0Bc-gaJpZM4QUZqg .
--
Itamar Haber | Chief OSS Education Officer Redis http://www.redislabs.com/Labs http://www.redislabs.com/ ~/redis
Mobile: +972 (54) 567 9692 Twitter: @itamarhaber https://twitter.com/itamarhaber Skype: itamar.haber
Comment From: rfyiamcool
@miriaford I thank redis lua solve your question.
Comment From: itamarhaber
This issue appears to be safe to close - please reopen or create a new one if needed.