---
title: "Discussion on \"Concurrency, Race Conditions and Concurrency Control\" | Hashnode"
description: "Discussion on \"Concurrency, Race Conditions and Concurrency Control\". Almost any large scale application will have some sort of concurrency involved, but what is concurrency? And what are the problems that arise because of concurrent code? And how can we handle them?\nIn this article, I will try to answer those question..."
url: "https://hashnode.com/posts/concurrency-race-conditions-and-concurrency-control/62af412d0924134a80489d1a"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Concurrency, Race Conditions and Concurrency Control](https://sayedalesawy.hashnode.dev/concurrency-race-conditions-and-concurrency-control?utm_source=hashnode&utm_medium=feed)

Almost any large scale application will have some sort of concurrency involved, but what is concurrency? And what are the problems that arise because of concurrent code? And how can we handle them? In this article, I will try to answer those question...

Jun 19, 2022 · 14 min read · sayedalesawy.hashnode.dev  
Read the article

-   [#web-development](https://hashnode.com/tag/web-development)
-   [#concurrency](https://hashnode.com/tag/concurrency)
-   [#go](https://hashnode.com/tag/go)

## Written by

[Sayed Alesawy](https://hashnode.com/@sayedalesawy)

@sayedalesawy · Cairo, Egypt

  
[View profile](https://hashnode.com/@sayedalesawy)

Lead Software Engineer @ Instabug

Lead Software Engineer at Instabug | Backend team. Passionate about large scale server side applications and distributed systems. Cairo University - Faculty of Engineering grad.

## Responses 3

Markdown supported · ⌘↵ to post

[Mohanad Gadallah](https://hashnode.com/@MohanadGadallah)

[Jul 12, 2024](https://hashnode.com/posts/concurrency-race-conditions-and-concurrency-control/62af412d0924134a80489d1a/comment/669160745e795247bb2e9846)

Nice article! It is very simple and packed with a lot of information. Thanks!

[Mohd Jasir Noor Khan](https://hashnode.com/@kjasir23)

[Jun 23, 2022](https://hashnode.com/posts/concurrency-race-conditions-and-concurrency-control/62af412d0924134a80489d1a/comment/62b43789b86f939ac81af86c)

Greate article [Sayed Alesawy](https://hashnode.com/@sayedalesawy)! very informative.

[Ahmed Akef](https://hashnode.com/@ahmedakef)

[Jun 19, 2022](https://hashnode.com/posts/concurrency-race-conditions-and-concurrency-control/62af412d0924134a80489d1a/comment/62af6f310924134a8048a662)

Great article as usual. but I have to comments:

1- in go mutex example you have to send the mutex by example in order not to create new instance with each pass which will result in no real locking, more details here: eli. thegreenplace. net/2018/beware-of-copying-mutexes-in-go/

2- (I know this shouldn't be in the article since it is introduction :D) in redis example, the unlock function may result in a problem if one thread is stuck longer than the lock time and when back it deletes the lock, then it may have deleted another thread lock. a solution for this problem is described here: redis .io/commands/set/

[Abdelaziz Sliem](https://hashnode.com/@abdelaziz321)

[Jun 20, 2022](https://hashnode.com/posts/concurrency-race-conditions-and-concurrency-control/62af412d0924134a80489d1a/comment/62af6f310924134a8048a662#reply-62aff32e0924134a8048b3b4)

@Ahmed Akef, I can't see the 2 links. can you update your comment 😊

[Sayed Alesawy](https://hashnode.com/@sayedalesawy)

[Jun 20, 2022](https://hashnode.com/posts/concurrency-race-conditions-and-concurrency-control/62af412d0924134a80489d1a/comment/62af6f310924134a8048a662#reply-62b02fd282adbb66f3a0abf3)

[Abdelaziz Sliem](https://hashnode.com/@abdelaziz321) I think hashnode blocks links comments.

[Ahmed Akef](https://hashnode.com/@ahmedakef)

[Jun 20, 2022](https://hashnode.com/posts/concurrency-race-conditions-and-concurrency-control/62af412d0924134a80489d1a/comment/62af6f310924134a8048a662#reply-62b039ae0924134a8048bde5)

I added spaces in the domain so it can't be identified, try to concatenate the URL parts to get the link [Sayed Alesawy](https://hashnode.com/@sayedalesawy)
