Asynchronous Vs Multithreading Vs Multiprocessing (Concept and Code)

  Рет қаралды 474

Hummingbird

Hummingbird

Күн бұрын

Пікірлер: 5
@redcrafterlppa303
@redcrafterlppa303 7 ай бұрын
Multi threading on a single core isn't useless. Take the onions and tomatoes example. You could be making tomato sauce for a large kitchen and you need to continuously make sauce. Dicing all onions, then all tomatoes then making the sauce and then delivering it makes everyone wait. If you dice a few onions, a few tomatoes, make some sauce and deliver it you can serve customers continuously instead of in 1 go. The same goes for the operating system and multiple programs. You want the video to continue to play and be able to control the mouse and keyboard, even on 1 core. Multiple threading more specifically context switching makes that possible.
@lacasadepapel9365
@lacasadepapel9365 6 ай бұрын
what is the difference between asynchronous and multiprocessing? since they are both parallel?
@aakashyadav2430
@aakashyadav2430 8 ай бұрын
awesome!! it's been so long..
@redcrafterlppa303
@redcrafterlppa303 7 ай бұрын
12:30 you are mixing async vs sync with multi processing vs threading. Both have nothing to do with each other and make the example meaningless and confusing. Multi processing is almost always unnecessary and slow. Multi threading is way cheaper and faster. This is just a python problem not something between threading and processing. In any other language threading is faster.
@redcrafterlppa303
@redcrafterlppa303 7 ай бұрын
10:40 you are mixing language implementation details with the concepts you are presenting. Multi threading can run on multiple cores in parallel. In fact it was designed to be. The problem is that python is a poorly designed language that cannot utilize multi core cpus in 1 process. This has nothing to do with multi threading. The difference between multi threading and multi processing is that with multi processing you create multiple processes that each are full programms being scheduled by the operating system. These processes have nothing shared between them. While multi threading shares the heap between all threads.
Hands-On Py Trees - Part 1 (Action, Condition, Sequence, Decorator)
21:03
Counter-Strike 2 - Новый кс. Cтарый я
13:10
Marmok
Рет қаралды 2,8 МЛН
A first look at a faster, no-GIL Python
6:56
InfoWorld
Рет қаралды 8 М.
Master Multithreading : Thread Pool In C++
20:19
CppNuts
Рет қаралды 14 М.
Concurrency and parallelism crash course
41:44
Nader Medhat
Рет қаралды 1,1 М.
Unlocking your CPU cores in Python (multiprocessing)
12:16
mCoding
Рет қаралды 312 М.
Visual Odometry Series - Part 1 (Concept and Math)
12:02
Hummingbird
Рет қаралды 1 М.
5 Useful Dunder Methods In Python
16:10
Indently
Рет қаралды 66 М.
Learn Python's AsyncIO in 15 minutes
14:02
Indently
Рет қаралды 54 М.