---
title: "Comment by Adewole Caleb Erioluwa on \"Writing Mutex Logic for Concurrency Control\" | Hashnode"
description: "What is your take on the possibility of acquisition of redis locks by different thread at the same time?. Is there a likelihood of that happening?"
url: "https://hashnode.com/posts/writing-mutex-logic-for-concurrency-control/654d6b1f2e3544816cc6f4b9/comment/654e3c580701ac13578c21d9"
---

[Discussion](https://hashnode.com/posts/writing-mutex-logic-for-concurrency-control/654d6b1f2e3544816cc6f4b9)

Comment [Writing Mutex Logic for Concurrency Control](https://hashnode.com/posts/writing-mutex-logic-for-concurrency-control/654d6b1f2e3544816cc6f4b9)

[Adewole Caleb Erioluwa](https://hashnode.com/@codeboax)

[Nov 10, 2023](https://hashnode.com/posts/writing-mutex-logic-for-concurrency-control/654d6b1f2e3544816cc6f4b9/comment/654e3c580701ac13578c21d9)

What is your take on the possibility of acquisition of redis locks by different thread at the same time?. Is there a likelihood of that happening?

[Timothy Adeyeye](https://hashnode.com/@Codescroll)

[Nov 10, 2023](https://hashnode.com/posts/writing-mutex-logic-for-concurrency-control/654d6b1f2e3544816cc6f4b9/comment/654e3c580701ac13578c21d9#reply-654ebb850701ac13578c29eb)

Yes. In a distributed system, there's a possibility of this happening. That's why it is good as a best practice to implement a robust exception handling technique to gracefully cater for this. Including an efficient retry mechanism to serialize the conflicting threads. But generally, and even in a distributed system, the possibility is almost zero. Considering that the redis SETNX operation used to acquire the lock is atomic.
