Multiprocessing in Python: Introduction (Part 1)
LucidProgramming
0:00 / 0:00
Multiprocessing in Python: Introduction (Part 1)
80 666 просмотров · 8 л. назад
LucidProgramming
43,2 тыс. подписчиков
80 666 просмотров · 8 л. назад
This video is sponsored by Oxylabs. Oxylabs provides market-leading web scraping solutions for large-scale public data gathering. You can receive data in JSON or CSV format and pay only per successful request. At the moment, Oxylabs offers a free trial.
https://oxylabs.io/?utm_source=lucidp...
In this video, we will be introducing the multiprocessing module in Python.
According to the official documentation (https://docs.python.org/2/library/mul...
"multiprocessing is a package that supports spawning processes using an API similar to the threading module. The multiprocessing package offers both local and remote concurrency, effectively side-stepping the Global Interpreter Lock by using subprocesses instead of threads. Due to this, the multiprocessing module allows the programmer to fully leverage multiple processors on a given machine. It runs on both Unix and Windows."
Specifically, in this video, we will be writing a "square" function that takes a number and returns its respective square. We will then take a look at how to call this function in such a way that each call to the function is spawning a different process.
Software from this video:
https://github.com/vprusso/youtube_tu...
For more videos on multiprocessing:
http://bit.ly/lp_multiprocessing
Do you like the development environment I'm using in this video? It's a customized version of vim that's enhanced for Python development. If you want to see how I set up my vim, I have a series on this here:
http://bit.ly/lp_vim
If you've found this video helpful and want to stay up-to-date with the latest videos posted on this channel, please subscribe:
http://bit.ly/lp_subscribe