# Handling Concurrency Without Locks

DevFeed: [Handling Concurrency Without Locks](<https://devfeed.tech/articles/handling-concurrency-without-locks-33894.md>)

Original publisher: [Read original article](<https://hakibenita.com/django-concurrency>)

Author: Haki Benita

Published: 2022-06-08T21:00:00Z

Content type: tutorial

Language: en

Sources: [Haki Benita](<https://devfeed.tech/sources/haki-benita.md>)

Topics: [Concurrency](<https://devfeed.tech/topics/concurrency.md>), [Concurrent Programming](<https://devfeed.tech/topics/concurrent-programming.md>), [Processes](<https://devfeed.tech/topics/processes.md>), [Django](<https://devfeed.tech/topics/django.md>), [PostgreSQL](<https://devfeed.tech/topics/postgresql.md>), [Python](<https://devfeed.tech/topics/python.md>)

Tags: [articles](<https://devfeed.tech/tags/articles.md>), [code](<https://devfeed.tech/tags/code.md>), [concurrency](<https://devfeed.tech/tags/concurrency.md>), [django](<https://devfeed.tech/tags/django.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [locks](<https://devfeed.tech/tags/locks.md>), [orm](<https://devfeed.tech/tags/orm.md>), [postgresql](<https://devfeed.tech/tags/postgresql.md>), [processes](<https://devfeed.tech/tags/processes.md>), [python](<https://devfeed.tech/tags/python.md>)

## AI overview

A tutorial on recognizing and handling concurrency problems when multiple processes execute code at the same time. It uses a URL shortener built with Python, Django, and PostgreSQL to demonstrate common challenges and approaches that minimize locking.

## Source excerpt

Concurrency is not very intuitive - you need to train your brain to consider what happens when multiple processes execute a certain code block at the same time. In this article I present common concurrency challenges and how to overcome them with minimal locking.