Asyncio - Asynchronous programming with coroutines - Intermediate Python Programming p.26

preview_player
Показать описание
Welcome to an Asyncio with Python tutorial. This tutorial will be specifically for Python 3.5+, using the latest asyncio keywords. Asyncio is the standard library package with Python that aims to help you write asynchronous code by giving you an easy way to write, execute, and structure your coroutines. The Asyncio library is for concurrency, which is not to be confused with parallelism.

Рекомендации по теме
Комментарии
Автор

I didn't know Edward Snowden was now doing Python tutorials.

JohnDoe-vret
Автор

I just completed your tutorial set during the lockdown and I just want to say a massive THANK YOU for your tutorials. I'm a mechanical stress engineer and I always wished that I knew coding to automate and write programmes to help with my work. I now have a good basic understanding of Python thanks to you and several other Youtubers. I even managed to build few robots. Keep doing what you are doing!

vidura
Автор

Asyncio sounds like 'Ay, se cayó!' in Spanish, which translates to 'Oh no, he fell down!'

smartmineofficial
Автор

7:05 AMEN. Documentations just need to have a short introduction with a simple example so people at least know what they're dealing with. I don't understand how this isn't a thing.. seriously. People would have so much more general knowledge with such easy things (applies to Wikipedia, university, tutorials, literature, etc.)

nano
Автор

What a coincidence! I just about to search other sources for this topic... but now i can get it from my favorite source .😘

sudiptapandit
Автор

Have had good experiences with await in c#, so will also try it out in Python

FuZZbaLLbee
Автор

Very helpful, I'd just got my head around starting to write Python async code and this was great.

FYI I believe it's standard practice to do "await asyncio.sleep(0)" not "await asyncio.sleep(0.00001)". The 0 is enough to interrupt the task and give the loop/interpreter a chance to switch to something else and it saves having to create a real timer which I think can have small performance hits.

damianshaw
Автор

Thank you for all of these videos. Lots of fun going through them all. Appreciate the hard work.

mitchellfolbe
Автор

Asynckio 😂 this is what I will call it from now on 🙌🏼 great video! Thanks..

rivaanb
Автор

Thanks a lot for this series man! Really enjoyed and learned a lot from you. I hope you will be making more tutorials like these in the future. My favourite part in this series was the blob game project. Keep it up 😃

muhammadtalhabaig
Автор

Coroutine stands for concurrent routine.
When a function is to be split in pieces (async), then await should be called somewhere in that function and it's where the function (the flow) is going to be split (interrupt). Those interruptions and callbacks must be co-ordinated by someone: that's the event loop! A fifo queue where jobs are scheduled. So the reason of an await asynchio.sleep() is to give the function a chance to be split and the event loop a chance to check its queue of what else has to start or resume ;)

vapon
Автор

This was the best explanation of Coroutines on Youtube that I found.

shreyashkashyap
Автор

thank you for the intro, you made it clear with the running example.

teddycristian
Автор

for a long time i was ur subscriber but about a half a year im starting programming myself. ure doing awesome lessons, coz u show it in easy way. thx budd.

_test_test
Автор

when running async on a function, does that mean i need to make all other functions run async? or just what i want to run together?

PlasmoX
Автор

I enjoyed that he was hanging on the if-statement. It is just more realistic that shit like this goes wrong.

bratwurst
Автор

hi im getting error: loop = asyncio.get_event_loop()
AttributeError: module 'asyncio' has no attribute 'get_event_loop'
did package changed or its a bout python version?

simplepycodes
Автор

At 11:40, can you explain how you are using the variable "loop" in main(), when it was declared in if __name__ == '__main__':?? Are variables instantiated in that usable in the whole class?

cluberic
Автор

Hey @sentdex! Quick question, can I order the Python Cap? I was wondering what's wrong with the store it is closed :(

lodashnotebook
Автор

if i % 50000 is TRUE 49999 times, that's why it got so slow

pisoiorfan
welcome to shbcf.ru