---
title: "Discussion on \"Multiprocessing, Multithreading and GIL: Essential concepts for every Python developer\" | Hashnode"
description: "Discussion on \"Multiprocessing, Multithreading and GIL: Essential concepts for every Python developer\". Multithreading and Multiprocessing are ways to utilize 100% of the CPU and create performant applications. If you work with complex web applications, machine learning models or video/image editing tools then you have to tackle multithreading/multipro..."
url: "https://hashnode.com/posts/python-gil/60ba2e894f018f10d6234f40"
---

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

Discussion

# [Multiprocessing, Multithreading and GIL: Essential concepts for every Python developer](https://blog.muhib.me/python-gil?utm_source=hashnode&utm_medium=feed)

Multithreading and Multiprocessing are ways to utilize 100% of the CPU and create performant applications. If you work with complex web applications, machine learning models or video/image editing tools then you have to tackle multithreading/multipro...

Jun 4, 2021 · 10 min read · blog.muhib.me  
Updated Jun 5, 2021  
Read the article

-   [#python](https://hashnode.com/tag/python)
-   [#multithreading](https://hashnode.com/tag/multithreading)
-   [#operating-system](https://hashnode.com/tag/operating-system)

## Written by

[Ahmed Sadman Muhib](https://hashnode.com/@ahmedsadman)

@ahmedsadman

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

Software Engineer @ Optimizely

Software Engineer | Mentor | Cats | Food | Loves to learn

## Responses 3

Markdown supported · ⌘↵ to post

[Farhan Saif](https://hashnode.com/@FarhanSaif)

[Jun 6, 2021](https://hashnode.com/posts/python-gil/60ba2e894f018f10d6234f40/comment/60bc69fcfffc4c13b9cd7241)

Hi, Thanks for this amazing article. I got a question. When using flask, we can use uwsgi as a production server,while serving it with nginx, we need to define the amount of process / threads that will create access for multiple users. So,how to tackle this client request handling, is it best practice to use multiprocessing+multithreading in that case? \[Thanks for reading my question and I hope you'll continue this endeavour .Recently i started managing a vps and I'm confused about what are the best practices in this field\]

[Ahmed Sadman Muhib](https://hashnode.com/@ahmedsadman)

[Jun 6, 2021](https://hashnode.com/posts/python-gil/60ba2e894f018f10d6234f40/comment/60bc69fcfffc4c13b9cd7241#reply-60bc6b07fffc4c13b9cd7247)

In uwsgi or gunicorn, you define the amount of processes (called workers) that you want to run. Just workers should be fine. No need to use threads.

[Hopping Whopper](https://hashnode.com/@hopper)

[Jun 5, 2021](https://hashnode.com/posts/python-gil/60ba2e894f018f10d6234f40/comment/60bbe672fffc4c13b9cd6c7d)

Wow! I always had a wrong concept about threads and processes and their inner workings. Learnt a lot.

[S M Fahim Abid](https://hashnode.com/@fahimjami9)

[Jun 5, 2021](https://hashnode.com/posts/python-gil/60ba2e894f018f10d6234f40/comment/60bb8940fffc4c13b9cd6122)

Very informative. Thank you so much.

[Ahmed Sadman Muhib](https://hashnode.com/@ahmedsadman)

[Jun 5, 2021](https://hashnode.com/posts/python-gil/60ba2e894f018f10d6234f40/comment/60bb8940fffc4c13b9cd6122#reply-60bba55bfffc4c13b9cd64ee)

Thank you. Stay tuned for more articles in future
