Python asyncio

Veröffentlicht am: 25 Juli 2023
auf dem Kanal: Red Black Tech
15,860
507

This short highlights the importance of the await keyword in async programming in python.

The major takeaway of this critical quiz is that: just like in any process, each instruction, even inside an async function, is run until completion. the only instructions not run until completion, are (surprisingly) the ones that are awaited.

In other words, the await keyword is what enables parallelization in an async process (parallelization may be the wrong word, the right word may be concurrency).

This is a critical idea to keep in mind when using libraries in an async program. There are some libraries, such as the beloved requests library, which actually are not awaitable, so they block whatever async process they are a part of and can ruin an async script.

#interview


Auf dieser Seite können Sie das Online-Video Python asyncio mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer Red Black Tech 25 Juli 2023 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 15,860 Mal angesehen und es wurde von 507 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!