Just took a look. Great English skills, are you a native speaker? Regarding tips I can just say the usual stuff. Upload good videos on a regular basis. Make the titles catchy but not Scammy. Make the thumbnails catchy but not ridiculous. I think for some people age might be a factor because they don't want to learn from someone who is younger. In that case, patience will pay off. Besides that, just focus on learning and making videos on interesting projects and over time people will come to your channel. You seem like a good teacher. Good luck! :)
@@NeuralNine No, I'm not actually a native speaker, my first language was Hindi then Japanese and after that I learned English. I have used English the most and the longest though so that's why it's my best language! Thank you for the tips, I will keep all of them in mind! I'll also make sure to be patient!
what you have said to asynch programming describes precisely multithreading as well. In multithreading when a thread IOs and is waiting for stuff, another thread will get the CPU as GIL will be released
Threads preempt automatically, based on priorities or timeslice expiry. Coroutines only get preempted when they explicitly yield to other tasks. This makes for a simpler programming model.
@@lawrencedoliveiro9104 It sounds like a very undeveloped multi-threading infrastructure that needs such a ridiculous mechanism RTOS kernels support it natively (including prioritizing threads which are not available with python GIL
@@avivran1198 Threads were very big in the 1990s. And sure, all modern OSes and languages support them. It’s just that we don’t always need their complications.
Nicely explained. I watched other videos on same topic. But I got the real subject from this video only. Well understood difference between thread and asyncio.
Wow, it is an amazing content. Thank you. I would like to know more about asyncio in Python. How did you learn it? Do you recommend some lecture or article?
Thanks for the video, I think I now got the idea HOW it works, but I don't get WHY should I use it? What is the advantage over plain old simple python threads? Python threads are also run concurrently but not in parallel. So it seems like all asyncio is achieving is the same result, just with extra jumping through the hoops with this async/await syntax garbage. While starting a regular thread is literally one line of code and you don't even need to modify the target function in any way. Is it all just to save a couple milliseconds and kilobytes used on creating a new thread?
Because threads can be preempted at any time, they can lead to mysterious and hard-to-track-down timing-related bugs. Because coroutines only get preempted at the points where you explicitly allow them to, this keeps things simpler.
I think you're mistaken, "Asynchronous Programming" is a higher level concept that includes both multiprocessing and multithreading. Plus, i read that Asyncio is multithreading, but where the programmer chooses when to switch between threads.
bro, this code snippet has proved very helpful in my project, but can you send me the code snippet if I want to print A,B,C asynchronously rather than A and B only, then ??????????????
I hate asyncio, i think it's usles, it can't do anything better than normal Threads. I don't even feal that this ist easier. But your Video helped me understand.
It seems that this mechanism has too many quirks one should be aware if using it. like the one demonstrated on time 6:34 it seems that "task" was created. On one hand it was invoked though the main thread reached it end, while on the other hand it was invoked but due to release CPU when went sleeping the main thread existed not allowing the "task" to complete properly. This is insane, immature to be used.... kind of a joke Does anyone know a serious documentation on the web which thoroughly explains this mechanism ???? thanks
Even though I watched a lot of videos and read a lot of articles about asynchronous, I did not understand the mean idea of asynchronous until I watched the very first four minutes of your video. Great explanation! Thank you!
This is a crystal clear explanation with the easiest examples. I have watched a few clips before this about the same topic, but I could only get a vague idea about this concept. Now, I think I can use this for my code. Much appreciated.
4:58 > this is not very asynchrounos 5:30 > while [other] is sleeping, print b yeah; thtat's what i wanted 6:05 > once we have some idle time; we're going to run this task 6:19 it seems to me that asyncio _tends to_ perform only cpu-bound blocking task and skip over the non-cpu task unless awaited for 8:48 ret vals 10:40 > future in python; it's like a promise in javascript thanks a lot - i have been watching soo many videos, but none covered it his well... others went somewhat deep but still missed the point. u kept it to manageable but still covered the worthy concepts of returns etc... thanks a lot. ----- ```import asyncio async def main(): task = asyncio.create_task(otfn) print('a') await asyncio.sleep(1) print('b') ret_val = await task async def otfn(): print('1') await asyncio.sleep(2) print('2') return 10 asyncio.run(main())```
I have been studying asyncio for two weeks. I watched this video for the second time and now i think I understand this complex programming Thanks a lot❤
thank you for the video. I am not sure if your description of the difference between asyncio multithreading is accurate though. Aren't they generally about the same, i.e. concurrency (not parallelism) and the difference would be that in multithreading OS decides when to switch between the threads while in asyncio it is programmer themselves who indicates when it is safe to switch? I am by no means an expert in asynchronous/concurrent programming, so it is more a question than a decisive opinion
ValueError: Unrecognized type code -1 i am using a library called neuralintents to create an AI VIRTUAL VOICE ASSISTANT, but for some reason when i load the model i get that error? any ideas?
Well explained, I watched 7-8 videos before this and this is the best explanation. Great work. Would like to see more on Asyncio and also Go tutorials :)
Hi, I need to make http requests to a REST API made in Flask from an app made in Tkinter. My question is if I need to use asyncIO to make the calls or is unnecessary in this case? The REST API was made to do CRUD operations connecting to a SQL database.
thank you for the video, just stepped upon your channel and watched alot of videos. Idk why but I cant get my head around asynchronous programming. I know it is basically telling the process to stop wasting time and do something whenever ur waiting. But the implementation is hard for me to understand.
7:17 hey, i just noticed. so; it means that control doesn't "await" as in pause till the completion of await.sleep right? while it waits for other "await"s? am i right?
You should have also printed time in millis along with the a b 1 2. Important note, even do the program had total sleep of 3 seconds, the actual total running time of the program is less.
Hello! I have a very small programming channel, I was wondering if you had any tips for me? Thank you!
Just took a look. Great English skills, are you a native speaker? Regarding tips I can just say the usual stuff. Upload good videos on a regular basis. Make the titles catchy but not Scammy. Make the thumbnails catchy but not ridiculous. I think for some people age might be a factor because they don't want to learn from someone who is younger. In that case, patience will pay off. Besides that, just focus on learning and making videos on interesting projects and over time people will come to your channel. You seem like a good teacher. Good luck! :)
I just saw that you are doing this for one month. That is not a long time. You are doing quite well. Work hard, be creative but don't be impatient ^^
@@NeuralNine No, I'm not actually a native speaker, my first language was Hindi then Japanese and after that I learned English. I have used English the most and the longest though so that's why it's my best language! Thank you for the tips, I will keep all of them in mind! I'll also make sure to be patient!
@@neelbanga Wow impressive. Keep pushing, I think you will be successful! :) I will pin your comment. Maybe you will get some subs that way.
@@NeuralNine Thank you so much!!! I love your videos, BTW I’m subscribed, it means a lot to be pinned by you!!!
Probably the best explanation of basic asyncio on YT
Keep going brother. Thank you so much for this channel and your videos ❤
thanks for watching :)
I think its better to start a new channel or whatever maybe for BodyBuilding - NeuralFitness
exactly what I wanted. Great and simple explanation
Thank you for explaining complicated things in simple words!
what you have said to asynch programming describes precisely multithreading as well. In multithreading when a thread IOs and is waiting for stuff, another thread will get the CPU as GIL will be released
Threads preempt automatically, based on priorities or timeslice expiry. Coroutines only get preempted when they explicitly yield to other tasks. This makes for a simpler programming model.
@@lawrencedoliveiro9104 It sounds like a very undeveloped multi-threading infrastructure that needs such a ridiculous mechanism
RTOS kernels support it natively (including prioritizing threads which are not available with python GIL
@@avivran1198 Threads were very big in the 1990s. And sure, all modern OSes and languages support them. It’s just that we don’t always need their complications.
Thank u very much man. Helped a lot. U explained it in a very elaborate and understandable way.
Crisp and Clear!
Perfect. Thanks a ton!
Nicely explained. I watched other videos on same topic. But I got the real subject from this video only. Well understood difference between thread and asyncio.
This is the best explanation about async/wait in Python, thank you buddy!
Easily explained with efficiency. Thanks man !!
Nice stuff, in a few minutes I was able to get a good idea of asyncio and clear quite some doubts. Thanks!
neuralnine coming in clutch AGAIN.
Man, I rarely subscribe to channels.. and you made me do it.. a sub from me♥️. Underrated content👌🏻
Wonderful explanation and great examples, thank you.
Wow, it is an amazing content. Thank you. I would like to know more about asyncio in Python. How did you learn it? Do you recommend some lecture or article?
Perfect video - definitely the easiest to follow explanation of this topic that I've seen so far. Thanks!
Excellent explainer for a beginner like me. Thanks man!
Thank you for your nice video. I learned a lot from it.
at10:20 u could also just use f"{return_value = }"
very nicely explained, Thank you for the tutorial
Best video to the topic! Thank you!
Great explanation, man, thanks a lot!
THANK YOU! VERY CLEAR EXAMPLE😁
Best explanation
Amazing explanation!
Thanks for the video, I think I now got the idea HOW it works, but I don't get WHY should I use it? What is the advantage over plain old simple python threads?
Python threads are also run concurrently but not in parallel. So it seems like all asyncio is achieving is the same result, just with extra jumping through the hoops with this async/await syntax garbage.
While starting a regular thread is literally one line of code and you don't even need to modify the target function in any way.
Is it all just to save a couple milliseconds and kilobytes used on creating a new thread?
Because threads can be preempted at any time, they can lead to mysterious and hard-to-track-down timing-related bugs. Because coroutines only get preempted at the points where you explicitly allow them to, this keeps things simpler.
I think you're mistaken, "Asynchronous Programming" is a higher level concept that includes both multiprocessing and multithreading. Plus, i read that Asyncio is multithreading, but where the programmer chooses when to switch between threads.
well explained, thank you!
bro, this code snippet has proved very helpful in my project, but can you send me the code snippet if I want to print A,B,C asynchronously
rather than A and B only, then ??????????????
amazing i was asking myself how its possible :D
enjoy :D
Freaking amazing explanation!!
Not getting the same results. makes hard to follow along/learn if I can't get the same results.
Amazing 🎉
Is this a built in color profile or you have your own?
I love your videos keep going
My question has noting to do with programming but is your arm real ?
My personal hero
I hate asyncio, i think it's usles, it can't do anything better than normal Threads. I don't even feal that this ist easier. But your Video helped me understand.
It seems that this mechanism has too many quirks one should be aware if using it.
like the one demonstrated on time 6:34
it seems that "task" was created. On one hand it was invoked though the main thread reached it end, while on the other hand it was invoked but due to release CPU when went sleeping the main thread existed not allowing the "task" to complete properly. This is insane, immature to be used.... kind of a joke
Does anyone know a serious documentation on the web which thoroughly explains this mechanism ???? thanks
good video
Waiting for Python ARCADE
Does the program have 2 threads , one to execute and one to select which function to execute?
finally 😃. still waiting for reinforcement learning
edit : why no reply to me 😅
flori hmmmmmmmm, shiptar koka , e di une, sigg ,qin qin XD
I know shiptar means Albanian, but I am from Austria ^^
is Flori a common name in austria. First time i heard it outside of albania. Much love for the video ❤️.
You totally lost me. I never wrapped my head around this in Javascript either.
RJVX12 bring me 300% profit because of Tesla pump
is there really still a person who does not know about the existence of RJVX12 algorithm?
terrible video
Even though I watched a lot of videos and read a lot of articles about asynchronous, I did not understand the mean idea of asynchronous until I watched the very first four minutes of your video. Great explanation! Thank you!
This is a crystal clear explanation with the easiest examples. I have watched a few clips before this about the same topic, but I could only get a vague idea about this concept. Now, I think I can use this for my code. Much appreciated.
How does one get the return values when create_task has more than one function?
4:58 > this is not very asynchrounos
5:30 > while [other] is sleeping, print b
yeah; thtat's what i wanted
6:05 > once we have some idle time; we're going to run this task
6:19 it seems to me that asyncio _tends to_ perform only cpu-bound blocking task and skip over the non-cpu task unless awaited for
8:48 ret vals
10:40 > future in python; it's like a promise in javascript
thanks a lot - i have been watching soo many videos, but none covered it his well...
others went somewhat deep but still missed the point.
u kept it to manageable but still covered the worthy concepts of returns etc...
thanks a lot.
-----
```import asyncio
async def main():
task = asyncio.create_task(otfn)
print('a')
await asyncio.sleep(1)
print('b')
ret_val = await task
async def otfn():
print('1')
await asyncio.sleep(2)
print('2')
return 10
asyncio.run(main())```
Your code is buggy and doesn't work. Here is the fixed version:
import asyncio
async def main():
task = asyncio.create_task(otfn())
print('a')
await asyncio.sleep(5)
print('b')
ret_val = await task
print("Return value: ", ret_val)
async def otfn():
print('1')
await asyncio.sleep(2)
print('2')
return 10
asyncio.run(main())
@@MFM88832 hi! the code was copy pasted from the video as far as i can think
Love the lessons, thanks man, keep it up 👏🏽
OMG IM FIRST!
Edit: NEURAL REPLIED ON MY COMMENT! I LOVE HIS VIDS
^^
Nice balance of explanation and elaboration, much appreciated!
I have been studying asyncio for two weeks. I watched this video for the second time and now i think I understand this complex programming
Thanks a lot❤
thank you for the video. I am not sure if your description of the difference between asyncio multithreading is accurate though. Aren't they generally about the same, i.e. concurrency (not parallelism) and the difference would be that in multithreading OS decides when to switch between the threads while in asyncio it is programmer themselves who indicates when it is safe to switch? I am by no means an expert in asynchronous/concurrent programming, so it is more a question than a decisive opinion
Multithreading also does one thing at a time. It is also does the thing concurrently
Why do this instead of just using actual threads/processes?
Excellent explanation of async await. Thank you very much sir.
Great video as usual. Will it be possible for you to make a video on the abc library?
I've been coding for about 3 months now and my arms still aren't as big as yours.. what am I doing wrong?
Very good video.
Is it possible to share memory between two asynchronous tasks while they are running?
Great video. It was easy to digest and it was fast to the point. Thank you!
you can use the asyncros function for making a illusion of the mesages lagging but their not lagging
ValueError: Unrecognized type code -1
i am using a library called neuralintents to create an AI VIRTUAL VOICE ASSISTANT,
but for some reason when i load the model i get that error? any ideas?
I beg you, answer me
Thank you this very helpful
Thanks man. Loved this video.
Bro you got nice biceps ;)))))))
What app do you use for coding?
This was very very good
start a fitness channel pl´z
Awesome, just as I was looking into async you uploaded this. You helped alot, thank you!
Btw: holy biceps!
thanks brother :D
helped a lot. tnx
Great vid
pudden jiiz
Well explained, I watched 7-8 videos before this and this is the best explanation. Great work. Would like to see more on Asyncio and also Go tutorials :)
I am getting the error "partially initialized module 'asyncio' has no attribute 'run " . any solution?
cool
RJVX12 algorithm is my choice, i dont worry about BTC rates at all
Hi, I need to make http requests to a REST API made in Flask from an app made in Tkinter. My question is if I need to use asyncIO to make the calls or is unnecessary in this case?
The REST API was made to do CRUD operations connecting to a SQL database.
thank you for the video, just stepped upon your channel and watched alot of videos. Idk why but I cant get my head around asynchronous programming. I know it is basically telling the process to stop wasting time and do something whenever ur waiting. But the implementation is hard for me to understand.
Better explained impossible. I have seen other videos explaining this topic without understanding, but this guy is a crack. Subscribed!
7:17 hey, i just noticed. so; it means that control doesn't "await" as in pause till the completion of await.sleep right? while it waits for other "await"s? am i right?
You should have also printed time in millis along with the a b 1 2. Important note, even do the program had total sleep of 3 seconds, the actual total running time of the program is less.
That content is very helpful! Thank you for clarifying explanation!
Hello what is your type of the mechanical switches , sound is impressive 🎷
Great explanation, thank you so much!
Why are you watching this!? Read about the RJVX12 algorithm!
You don't look nerdy but your lecturing was actually very good.
wait thats awesome i want to learn the asyncio module because of your sockets video
I read and watched videos without understanding, I found your video and understood everything. Great video, simple and well explained.
very well explained
Thanks so much
u soo cool! Thanks to you, I'm starting to do small projects
Very clean explanation, Thanks!
Seriously? No one notices his giant Biceps?
Love watching ur videos ❤️🤘
I was confused at the few first minutes but when you're at the returning section, things got much clearer.
thanks! 👌