NhacVibe
Ảnh bìa Python Threads - MultiThreading in Python and Python GIL - Python MultiProcessing

Python Threads - MultiThreading in Python and Python GIL - Python MultiProcessing

AI Build Trek · 31,9 N lượt xem · 15 thg 4, 2021

Mô tả

Welcome to the video series multithreading and multiprocessing in python programming language and in this video we'll also talk about the famous or rather infamous python Global Interpreter Lock or Python GIL.

This video starts with clarifying that fact that python threads are indeed real threads and there is one kernel level thread is created for every python thread we create from python programming language.

After understanding the same, we'll learn in detail about the python GIL or Python Global Interpreter Lock and we'll also see how it works by creating multiple threads and understand how python GIL impacts the execution of multiple threads. I've also created a comparison between C++ threads and Python threads so that we understand the same in the easiest possible way.

I'll create multiple threads by creating CPU intensive jobs so that we can understand how it impacts the multithreading in python. I've also touched upon the multiprocessing in python and explain the scenarios on which you need to use python multiprocessing and not the multithreading.

At the end of this video, I've explained the Object Oriented way of creating the python threads and then how we can create a class by deriving the same from python Thread. In general, the OOP way is more acceptable way to create the thread.

Hope this video will help you in expediting your learning journey. Here are the contents of this video

Timecodes :

0:00 - Multithreading in Python
0:40 - CodeSports.ai intro
0:5