title: How to handle concurrent updates to redis key?
body: <p>I searched in google on the same but I couldn't find a clear cut answer.</p>
  
  <p>The use case I want to solve is following. Multiple systems sends out the process completion status all associated to the same identifier. I want to send out a notification when all processes associated with the same identifier gets completed. I thought of using redis as my data store with identifier as the key. The notification system is multi threaded and will process the status completion events coming from different systems. </p>
  
  <p>Scenario: Identifier 123 has two processes p1 and p2 associated to it. Say one of the notification system thread processes p1 completion status. It pulls the data associated with 123 from redis. It sees that p2 is not yet completed. It adds p1 completion status to the redis value and updates the key. Say the same thing happens in parallel for P2 completion status. At the end none of my two threads emit the final completion status. How to go about solving this issue?</p>
  
  <p>I see from redis documentation that redis is single threaded. Does that mean that when one thread performs an update for a key, no other thread can perform any read/write operation for the same key?</p>