Python Asynchronous Programming - 2 - Synchronous vs Asynchronous

Veröffentlicht am: 28 January 2022
auf dem Kanal: buildwithpython
11,106
199

Before we start coding lets understand the terms and differences between Synchronous vs Asynchronous Programming.

Synchronous
In sequence. One after other. Thread is blocked.Speed of execution of code depends on your process. Has to wait for the funtion to end ( Example infinite while loop)
Asynchronous
Doesn't has to wait for a part of code to be finished before executing another one.

Example
Human (thread) is waiting in line for movie tickets. For the sake of this example , he is unique human being who can only do 1 thing at a time. So while waiting in line for movie tickets. He can't do anything else. We can also say he has locked on to only getting movie tickets. He can't use intagram while getting movie tickets. Only after he has gotten the movie tickets he can start using instagram on his phone. This is an example of synchronous programming. Now this sounds a lil dumb he should be a ble to use instagram which waiting in line for the movie tickets. This in code is achived by asynchronous programming.

Next video - Async vs MutilThreading vs MultiProcessing

Full playlist -    • Python Asynchronous Programming with Async...  

Subscribe -    / @buildwithpython  

Instagram -   / buildwithpython  


Auf dieser Seite können Sie das Online-Video Python Asynchronous Programming - 2 - Synchronous vs Asynchronous mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer buildwithpython 28 January 2022 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 11,106 Mal angesehen und es wurde von 199 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!