Python Multithreading Tutorial #1 - What is a Thread?

preview_player
Показать описание
This python multithreading tutorial talks about what a thread is and how it compares to a process. Multithreading is a commonly used strategy to improve the efficiency of code. When multiple threads are running if the current thread delays or is waiting for something then the next thread will start executing.

Source-Code: Coming soon...

◾◾◾◾◾
💻 Enroll in The Fundamentals of Programming w/ Python

◾◾◾◾◾◾

⚡ Please leave a LIKE and SUBSCRIBE for more content! ⚡

Tags:
- Tech With Tim
- Multithreading in python
- Python multithreading tutorial
- Python Tutorials
Рекомендации по теме
Комментарии
Автор

PLEASE DO MORE PYTHON PROBLEMS AND SOLUTIONS!!
Like one a week?

elishashmalo
Автор

this video helped me reduce lag in my applications that have over 250, 000 objects

FeedFall
Автор

nice video man, i was unable to understand at beginning when i looked at the code, but then i understood evrything after your illustrations.

anonjr
Автор

If it's possible to show msec in the clock time this may be a better demonstration to show how the threads wait and start.

baruchba
Автор

Awesome tutorial dude! You're really talented :))

upasanadhameliya
Автор

Is there any priority? Lets say thread 1 sleeps so thread 2 starts and takes 5 minutes without a break to finish. thread 1 (half executed) would then have to wait 5 minutes until it resumes and finishes then?

DanielWeikert
Автор

"Multithreading" is a very big word when it comes to plain python. You won't be getting any significant performance gain from doing it.


The problem is that Python's GIL will protest against any form of parallelisation. I tried to build a package that could deliver a Python based BSP package, but was unable to get the GIL to play nice in any generalised case. Hence, the project is currently on the backburner.

muizzy
Автор

My main wonder is what happens if you set two threads to delay for the same intervals of time

Hamheadon
Автор

where did you learn this, can u share the resource, if it is a pdf?

munivoltarc
Автор

Perfect explanation .. keep it up 👻👍👍👌

devpatel
Автор

I'm just getting into threading for my kivy app. The reason being is that I have an nslookup function bound to a kivy button and on the button press a progress spinner should appear while the nslookup is running. However when I press the button the app freezes (presumably because the function is an nslookup and doesn't actually interact with the GUI). So my thinking is that I run the function and the progress spinner animation on different threads so the spinner doesn't have to wait for the nslookup to complete. Am I thinking along the right lines here? Will threading help me to achieve this or should I be looking into something else?

awwwwhhhyeahhhh
Автор

I am looking into making a device manager that would interact with several comports (at least 2-3, but could be as many as 6) that would read logs/write commands. What would be the most efficient implementation? Running each port in its own thread? Perhaps dedicate a core to running all of the serial port threads? How would I share the logs read into each serial port with the main thread running the computation/testing?

arshia.sasson
Автор

why different number of empty spaces? Can anyone explain? Thanks

maulikmadhavi
Автор

When are deep learning tutorials coming ??

aryanbhatia
Автор

Any thought about the gevent? Is it good?

kitgary
Автор

Please make video on vscode..its very good.. but lot of issue we face while running e.g. extension do not load, update json files etc ( Python ML developer )

ashishsrivastava
Автор

Bro can you upload a tutorial in webscraping in python

manishkumar-bhcc
Автор

I think it's Python which cannot run two threads at the same time due to GIL.

chujuntang
Автор

OMG PYGAMES WEBSITE IS DOWN WHATS HAPPENING?!?!?!?!?

FeedFall