diff --git a/lib/redis.rb b/lib/redis.rb index afd9d628b..563415c38 100644 --- a/lib/redis.rb +++ b/lib/redis.rb @@ -100,7 +100,9 @@ def call(*command) # See http://redis.io/topics/pipelining for more details. # def queue(*command) - @queue[Thread.current.object_id] << command + synchronize do + @queue[Thread.current.object_id] << command + end end # Sends all commands in the queue.