This tutorial is handsdown the best thing that I have viewed/consumed in terms of explaining how async works and is super helpful in understanding some of the things that Tokio brings in a really really really concise manner - I so greatly appreciate the time and effort you put into your videos man ❤ plz don’t be one of the great UA-camrs that ghosts us 🥲🥲😅❤❤❤❤
Wow, thanks for commenting! This is the exact reason I make those videos: to bring clear explanations about topics that used to confuse me. Don't worry, I won't ghost anyone. I'm in this for the long game. Hope to see you around regularly!
Async in computer science usually means an operation that doesn't block a calling thread and completes asynchronously to it so the thread can continue to do some useful work and later check for operation completion status. For example, a file operation can be completed asynchronously by a kernel thread, later the thread that started this operation checks or waits for operation completion. I think the earliest implementation at operating system level was asynchronous (overlapped) IO in Windows NT. Async can also be implemented at a device driver level. For example, when a network card driver or disk driver completes an IO request when processing an interrupt that is sent by a device on IO completion. This was implemented in Windows NT.
Actually, switching threads for the same process is cheap compared to most operations, like file IO. The stack doesn't need to be copied. Switching to another virtual address space is expensive, which happens when a thread for another process is scheduled.
You very much do not need to copy the stack when changing threads. What actually happens is that you just use a different stack by changing the stack registers to that from the other thread. Think of it like moving a string: you copy the pointer to it but not the data itself.
Thank you so much for explaining the difference between tasks and threads, and how to tokio deal with them! Apart from that, I realised the part about the channel implementing a not used receive_messages function. Could you please explain to me why?
Loved this content man
This tutorial is handsdown the best thing that I have viewed/consumed in terms of explaining how async works and is super helpful in understanding some of the things that Tokio brings in a really really really concise manner - I so greatly appreciate the time and effort you put into your videos man ❤ plz don’t be one of the great UA-camrs that ghosts us 🥲🥲😅❤❤❤❤
Wow, thanks for commenting! This is the exact reason I make those videos: to bring clear explanations about topics that used to confuse me.
Don't worry, I won't ghost anyone. I'm in this for the long game. Hope to see you around regularly!
Your explanations are very good and clear. Thank you
Thanks man!
This is the gold of the tutorial - I subscribed immidately.
Please keep making videos, algorithm is working
Thanks for the motivation, much appreciated. I am currently working on the next one, should be out on the weekend!
Async in computer science usually means an operation that doesn't block a calling thread and completes asynchronously to it so the thread can continue to do some useful work and later check for operation completion status. For example, a file operation can be completed asynchronously by a kernel thread, later the thread that started this operation checks or waits for operation completion. I think the earliest implementation at operating system level was asynchronous (overlapped) IO in Windows NT.
Async can also be implemented at a device driver level. For example, when a network card driver or disk driver completes an IO request when processing an interrupt that is sent by a device on IO completion. This was implemented in Windows NT.
Thank you for the insight, very interesting. NT having the first async IO seems really late though.
Subscribed, excelent videos man. Thanks and keep up the great work you are doing. I really like your teaching skills.
Actually, switching threads for the same process is cheap compared to most operations, like file IO. The stack doesn't need to be copied. Switching to another virtual address space is expensive, which happens when a thread for another process is scheduled.
You very much do not need to copy the stack when changing threads. What actually happens is that you just use a different stack by changing the stack registers to that from the other thread. Think of it like moving a string: you copy the pointer to it but not the data itself.
Thank you so much for explaining the difference between tasks and threads, and how to tokio deal with them!
Apart from that, I realised the part about the channel implementing a not used receive_messages function. Could you please explain to me why?
Awesome
Good explanation
Thanks
I dont like green tea
But I like you!
I'm more of a cat person, personally.