Concurrency Concepts in Python
HTML-код
- Опубликовано: 29 авг 2024
- This video explores concurrency concepts in a Python context, such as multithreading, multiprocessing, async processing, parallel and interleaved processing, CPU and I/O bound workloads, and which concurrency techniques might be applicable to these different types of workloads. **This is not a code video**, we are just going to look at all these **concepts**, their definitions, and gain a better understanding of what they are and how they work in Python.
#mathbyteacademy #python
Slides for this Video
================
Available in GitHub blog repo: github.com/fba...
Direct link: tinyurl.com/2r...
My Python Courses
=================
- Python 3 Fundamentals (introduction to Python)
www.udemy.com/...
- Python 3 Deep Dive (Part 1 - Functional)
www.udemy.com/...
- Python 3 Deep Dive (Part 2 - Iteration, Generators)
www.udemy.com/...
- Python 3 Deep Dive (Part 3 - Hash Maps)
www.udemy.com/...
- Python 3 Deep Dive (Part 4 - OOP)
www.udemy.com/...
He explains like a hot knife over a butter. Such detailed explanation I don't find anywhere.
Glad you enjoyed the video!
Many times in the past, I attempted to understand the concept of multithreading programming in Python, but was unable to fully comprehend it and ultimately gave up. However, thanks to your detailed explanation, I now feel much more comfortable with the concept. I am grateful for the valuable content you have provided.
Glad I could help!
Btw Fred I finished all 4 parts of Deep Dive, and I wanted to say you helped me a lot. You are a great educator and by coincidence, we share the same alma mater Strathclyde University!
Glad you liked them. Strathclyde was great, I really enjoyed my stay in Glasgow! Small world 😀
@@mathbyteacademy Will there be Deep Dive 5? (perhaps Design Patterns is a good topic for such a venture)
I've started work on an async course - but will be quite a while before I get something out.
@MathByte Academy wow can't wait for the release
Awesome news! Can’t wait to buy separate course on async from you!!!
I wish I had skipped Uni (was a long time ago though) and just graduated from your academy. Well done, sir!
Hehe, glad you like the content!
I had to stop the video, to say thank you. This video is a gem. I am gonna give the rest of the videos in this channel a look, if they are of the same quality, then hey, the whole channel is a GEM :)
Glad you enjoyed it!
Thank you Fred for explaining all concepts so thoroughly. I bought all 4 parts of your Python 3 Deep Dive course on Udemy, and I keep recommending them to others.
Thank you!!
Same here. I work for a stock exchange doing analytics and the first thing I ask devs to do during their first month when they're waiting for accesses and stuff is to go through part 1 and part 4 of Fred's course. They have "aha" moments every day.
Thanks, glad to hear about those aha moments 😀
@@mathbyteacademy now if we could only get a second Fred to do a similar course on Rust … 👌🏼
😀 If you do find a good Rust course, please post it here! I'd be interested!
Thank you Fred . Crystal clear as always!
You are welcome!
This video definitely deserves like and comment for better promotion.
Thanks! That would be nice, but very few people bother to take the time to do so.
The greatest explanation, thanks ❤
You're very welcome!
this is one of the highest quality content i have seen. thank you for your efforts
You're welcome!
I want to thank you for your work! You are my favorite lecturer and the best one in my experience. I bought all your courses on udemy and this was the best way to spend that money and best course. Just want to thank you once again!
Thank you!
superb. just what I need to master. patiently waiting for the full course to come out. Thanks Dr. Fred
Thanks!
You’re such an inspiration Fred. Many Thanks for such videos.
Thanks!
You're one of the very best in teaching Python. Thanks!
Thank you!
Fred you are an amazing teacher. Huge respect for you!! And really thank you for your time and effort for the quality content.
Also, will you also be making videos on how you use your favourite IDE, some tips and tricks or setup those ?
Thanks, glad you like the content. I probably won't do videos on PyCharm (which is the IDE I use, not VSCode) as it's pretty straightforward for the most part - but I do have a video in this channel that describes how to set up PyCharm with Python virtual environments:
ruclips.net/video/1ypX9SRq5tc/видео.html
Great explanations! The completeness and clarity of this video is awesome and really helpful for beginners like me . Thanks!
Thanks!
Really great conceptual overview and helpful tips on libraries at the end!
Glad it was helpful!
One of your huge fan Fred. Following your Deep Dive series from Udemy as well. Your lectures are like those movies which not only are entertaining but also have BTS in the end. The way you explain the BTS of python concepts is amazing.
I am Professor myself who teaches Python to Engineering undergraduates and I always tell them that you are my teacher. Thanks for giving your knowledge to this world.
Thank you Abhishek, glad you like the videos!
But what does BTS stand for? I know it's a Korean band, but not sure what you mean here 😀
@@mathbyteacademy Behind The Scene
Ah, thanks!!
Your content is excellent Fred. Thank you!
Thanks for this. It is very helpful
Glad it was helpful!
It's a *great* video.
Thank you!
Hi Fred, I think I seen under one of your other videos you mentioned that you have been working on a async course for Udemy, I was wondering if this is still in progress, and if so is there at eta on it? Also if you haven't finished it yet, I would suggest to show the comparison between part 2 deep dive series, and the alternative in async, I recall you mentioning that part of the series is outdated, yet I can't seem to get my head around how they relate. Anyways keep up the good work, I have gotten so much benefits from your courses.
Hi John, no ETA yet on an async course - just finished the pydantic course, and taking a break for the holidays before resuming my work on it. Before the natuve coroutine capabilities of Python, you could define coroutines using generator functions (yield can both send and receive data). This has been deprecated, and instead coroutines are now natively available using things like async def and await, along with the functionality available from the asyncio standard library.
Jeez that was so good
Thanks, glad you liked it!
Many thanks!
You're welcome!
Thanks again for another great video explaining difficult concepts. I'm always recommending your channel and Udemy courses to all of my colleagues that want to improve their Python.
Thanks for that!
Thanks a lot for sharing the detailed knowledge Fred. Appreciate it!
My pleasure!
Another amazing video from. I have all of your Udemy courses and they are the best things I've bought on Udemy in the last decade. Would you consider making a course going into the details of asyncio starting right at the beginning? That's one part of Python I am not completely comfortable with 😅
Glad you like them!
Excellent as ever!
Thank you!
Can you use multiprocessing in combination with asyncio, meaning having one event loop per process? Would it be beneficial for I/O workloads? Thank you as always Fred!
Sure, I don't see why not (I've seen this done with threading not async, but I don't see why that would not work in theory). I would argue though, that if you need the CPU work distributed, you might be better off looking at an external queue and workers (each one can use async for I/O). If you use subprocesses you are limiting your scale to a single machine. If that single machine ever becomes insufficient for the load, you're only option (without rewriting your software) is to scale the machine up (beefier CPU, more cores, etc). With the queue/worker approach (I have an example video on that using Redis as a queue) you can easily scale out without any software rewrites (and the code is much much simpler).
still there is a lack of good resources about async python. it would be good to have full udemy part about it
Hi Fred, do you have any plans to extend the Deep dive series to include AysncIO ?
Hi, not at the moment.
@@mathbyteacademy 😔
Hi, if one thread paused and gave control back to main loop, but it must still wait and handle the callback of the I/O, right? dosen't it mean the the thread must still run somehow?
there are no callbacks - when the thread resumes, it checks to see if the I/O op completed or not (if not, it will just wait and eventually get switched out)
@@mathbyteacademy thanks for the explanation
Thank you Fred. where can i find, example for running async progrems, for none web app
I'm working on an async course right now, but won't be out till end of the year. I have a video showing an example of using async with queues, but that's not a general/broad concept async video. I would search for something on RUclips - in particular this series by @EdgeDB is really good: ruclips.net/p/PLhNSoGM2ik6SIkVGXWBwerucXjgP1rHmB
@@mathbyteacademy thank you