I have two redis-py clients that are accessing REDIS at the same time. Both clients are running infinite loops. Both clients are also looking at the same hash. The problem is that it seems when I start the continuous hgetall loop, I can no longer hset that value.
The first client is doing continuous hgetall
while True:
query = r.hgetall('myHash')
for result in query:
#do something with value1, value2
The second client is doing continuous hset. If I remove the second client and just manually hset a new value, I still cannot set a new value.
r.hset('myHash', 'value1', '23')
r.hset('myHash', 'value2', '17')
Is this because REDIS is single threaded and the client that is hgetall never releases the thread to allow an hset?