Your Explanation is good but in some point you skiping that point like you explain suspending function is a function with suspend modifier but you sir what is suspend modifier?
MAN! i look 1000 videos, READ 100000 books, i made 1000000 steps in this way, to anderstand about coroutines - BUT only your video HELPS ME!!!! THANK YOU VERY VERY MUCH from RUSSIA!!!!! you the BEST!!!!
You are the best teacher i have ever seen, i am not beginner in android , i know java, i come here to get something about kotlin. but you are really good at teaching. thank you. you should do it everytime
Hi, thanks for the video. Good work on showing examples with code. I have a some concerns with some parts though - 1. Coroutines are NOT threads, they are not even LIKE threads. If anything, there are similar to a generator function in python or javascript - simply a function that can be paused and resumed. If you define them in main thread, they will run on main thread, if you define them on background thread, they will run there, that is all. 2. There is a big difference between "parallel" and "concurrent" - Threads can run in parallel, independent of each other. Co-routines must run concurrently, more than one cannot be run at the same time (on same thread). As an example of difference between the two - Say there are 2 threads A and B each requiring 2 seconds of execution time. Running in parallel, they both will complete in 2 seconds total. Now, consider 2 co-routines A and B again requiring 2 seconds each. At best, they will take 4 seconds to complete, even running concurrently (1s A -> 1s B -> 1s A -> 1s B). 3. As a direct consequence of number 2, the reason you cannot call a "suspend" on co-routine outside of it is because nothing else is running while the co-routine is executing. My 2 cents. Again, thanks for the content.
I learned android with java from your Pluralsight Courses and i believe you are the best instructor! but few months later i switch to the flutter and i hope see your new videos with flutter. Thanks for everything.
Please sir you have covered a lot of things in Kotlin in an awsome way but some topics is still untouched by you like covariance and contravariance which is also very important to know if we learn kotlin for the android app development. Without covariance and contravariance it feels like we are missing very important topics. So I kindly request you to pls make some videos on them.
@@smartherd how to handler errors,i wrote but its getting repeated , globally without rewriting error code everytime in activity or fragement sir,ca n you please tell me sir..
Great video. Cleared many confusions for me. At 6:25 you say coroutines are light weight threads but they are also not threads. Isn't this contradicting statement?
You said that Multiple coroutines can run on same thread. In that case how can we guarantee mutual exclusion in coroutines. Can we use "synchronised" keyword here too just like we do in normal threads?
So, can't we do loadsharing by creating coroutines on Main thread as well as on background thread? And it they are lightweight, why not to create them on MainThread only?
00:00 Welcome
00:27 Threads vs. Coroutines
04:13 Coroutines Intro
05:22 Coroutines Properties
06:39 Implement Coroutines
19:02 delay function
24:25 suspend function
25:29 runBlocking lambda
30:19 Custom suspending function
31:29 Summary
32:42 What's next?
Your Explanation is good but in some point you skiping that point like you explain suspending function is a function with suspend modifier but you sir what is suspend modifier?
MAN! i look 1000 videos, READ 100000 books, i made 1000000 steps in this way, to anderstand about coroutines - BUT only your video HELPS ME!!!! THANK YOU VERY VERY MUCH from RUSSIA!!!!! you the BEST!!!!
i am with you from 9 years. I am a senior developer right now just becouse of you . thank you for your lessons.
Awesome Explanation Thanks for explaning in such an easy manner , Waiting for next video.
the best Channel and the best teacher on TH-cam, thanks
could you please do more deep Kotlin tutorials
thank you for your hard work
This is the best coroutines tutorial I have found, thank you so much!
this can't be explained in much simpler way, Thanks Man❤️
I love your explanation...simple and straight forward. Thanks a lot. Am waiting for another series like this on another android concept...
Thank you!! This was helpful, clear, concise and made simple to understand
This is the best coroutine explanation so far.
Loved the way you introduced coroutines in devfest 2021 and now following your playlist ✌️
You are the best teacher i have ever seen, i am not beginner in android , i know java, i come here to get something about kotlin. but you are really good at teaching. thank you. you should do it everytime
Thanks buddy
Hi, thanks for the video. Good work on showing examples with code.
I have a some concerns with some parts though -
1. Coroutines are NOT threads, they are not even LIKE threads. If anything, there are similar to a generator function in python or javascript - simply a function that can be paused and resumed. If you define them in main thread, they will run on main thread, if you define them on background thread, they will run there, that is all.
2. There is a big difference between "parallel" and "concurrent" - Threads can run in parallel, independent of each other. Co-routines must run concurrently, more than one cannot be run at the same time (on same thread). As an example of difference between the two - Say there are 2 threads A and B each requiring 2 seconds of execution time. Running in parallel, they both will complete in 2 seconds total. Now, consider 2 co-routines A and B again requiring 2 seconds each. At best, they will take 4 seconds to complete, even running concurrently (1s A -> 1s B -> 1s A -> 1s B).
3. As a direct consequence of number 2, the reason you cannot call a "suspend" on co-routine outside of it is because nothing else is running while the co-routine is executing.
My 2 cents. Again, thanks for the content.
Your way of teaching... just awesome....❤️
Please keep continue of making tutorial on Kotlin.
Thanks you very much
Why haven't i found this channel previously ...Such great explanation!!Thanks 🙌
Amazing explaination. I really thankful to you because you made this topic easy to understand by taking baby steps though your explanation.
From college days to senior developer, I'm following you!
Thank you so much. Most an awesome part of kotlin, please make videos about kotlin generics.
Sure
@@smartherd Thank you.
I learned android with java from your Pluralsight Courses and i believe you are the best instructor! but few months later i switch to the flutter and i hope see your new videos with flutter. Thanks for everything.
Just curious why did you switch to flutter?
I am just wondering how much patience and plans it took to make this video. It was helpful. Thanks.
Thank you for making my android life easier. Finally found one good channel for android 🤝
Such a clear explanation 🙏🏿
Great video to understand Coroutines, delay and suspend. Thank you !!
Simplest explanation that I came across.
Thanks man.
Thank you a lot for a good tutorial , i have never seen such kind of good tutorial. Your manner of teaching awesome☺
It is simply the best corutines tutorial. Thanks for sharing
The best thing is they don't have ads in between videos, so that I don't skip their ads at beginning.
Thank you very much.
The easiest explanation of this topic
Great content ! thanks for this great effort !!
Best Coroutines tutorial, Love it
Dude, what a video. Wonderful way of explaining. Thanks!
Thanks bro
Very clear explanation, Thank you
What an explanation 🙏🙏 , loving your videos ♥️
Very nice explanation. I read some topics but still got some clarity. Thanks.
Thanks a lot...Your videos are really helpful
Thank you so much for this great tutorial!
Thank you. Your explanation very easy to understand.
Thankyou, awaiting for another part
On the way
You had convinced me to subscribe your channel in just first 10000 mili seconds. Great job sir 👌 Thank you ❤️
Amazing sir g, i have watched all your videos. Love from Pakistan
Superb explanation!
Great explanation in simple manner... Please keep it up... 👍
great video and always explain this much don't think of video time length
Please sir you have covered a lot of things in Kotlin in an awsome way but some topics is still untouched by you like covariance and contravariance which is also very important to know if we learn kotlin for the android app development. Without covariance and contravariance it feels like we are missing very important topics. So I kindly request you to pls make some videos on them.
Excellent explanation.
Glad it was helpful!
thanks brother, please make more these kinds of videos. nice explained, so easy to understand
See links in description for more Coroutine videos
@@smartherd thanks brother. i am watching
Good one, thanks for the upload
This was very helpful...It helped me clear my concepts.Thanks
Very very helpful thanks
Great.... starting from scratch thank you
Cool video bro. Clear explanation.... Loved it
Clear explanation, thank you.
Huh waiting is over!! Please keep doing videos
Thank you, Pls create a playlist on scoped storage. No good content available on internet.
Great video thanks
Explanation was Awesome in simple manner. Good Work. Please do more videos on rxjava and react native. Thank you🙂
Thanks a lot for this, Really Helpfull !!
Great Explanation!
Best series ever i've seen. take love from #BD❤️
Best explanation keep it up
Great tutorial. Thanks Sriyank
Thank you:) Best basic information
amazing video...waiting for next videos in series
Well taught, thanks!
Best tutorial. Take love from bangladesh
Thank you sir
very well explained. Thank you.
Thank you
nice explanation
nice way to teach
Thanks and welcome
very good explanation ... keep it going. Thanks.
Please make video on covariance, contravariance in kotlin
thanks
your are just awesome
My Dear, top explainer!!!
Thanks man
hello! please tell me what is the difference between a delay(5000) function and a real function that takes 5 seconds to complete?
Kindly provide a video series on flow (coroutines)
As soon as possible
very good explanation sriyank
Thank you , It's great tutorials :)
thank you very much!
8:25 In kotlin 1.6.21, the `jcenter()` in `build.gradle` is not necessary.
Hi sir you always make me happy with your tutorials. Are you also on udemy?
Super,super,please do video on Kotli Flow coroutine sir
Sure, in progress
@@smartherd how to handler errors,i wrote but its getting repeated , globally without rewriting error code everytime in activity or fragement sir,ca n you please tell me sir..
well Explanation
Great. Siddharth. :)
Please put a video on running coroutines parallel.
On the way
can you make detailed video series over android unit testing from scratch?
IS mathematical operations comes under the main thread ?? i mean complex mathematical problems
Waiting for next video
In progress
Great video. Cleared many confusions for me. At 6:25 you say coroutines are light weight threads but they are also not threads. Isn't this contradicting statement?
they are considered to be 'light-weight" but behaves like real threads. Which means, they aren't actually threads.
how much time coroutines tack , how to decide by delay outside coroutines?
You said that Multiple coroutines can run on same thread. In that case how can we guarantee mutual exclusion in coroutines. Can we use "synchronised" keyword here too just like we do in normal threads?
Sir, please upload next video on coroutine
Kindly check description for next video
@@smartherd I mean 6th video
sir please do a video on safe api call with coroutines and error handler globally sir
So, can't we do loadsharing by creating coroutines on Main thread as well as on background thread? And it they are lightweight, why not to create them on MainThread only?
if we create multiple coroutines on a single thread, will it not block that single thread again?
Sir plz make more videos on flutter
Not right now but soon
Seriously dude, why aren't you one of the staff in Google's Android training team?
You would make our lives so much easier...
I am flattered
where have you been all my life
👍