Тёмный

Kotlin Coroutines Basics | Coroutine Scope & Coroutine Context Hindi - CheezyCode 

Cheezy Code
Подписаться 72 тыс.
Просмотров 55 тыс.
50% 1

Learn what is Coroutine Scope and Coroutine Context in Kotlin. Learn how to create Coroutines in Kotlin with example. In this video, learn how the main thread works with the help of looper and message queue. How thread helps in executing background tasks. What problems do we face while implementing long-running tasks on a background thread? What are the limitation of using threads and what problems do coroutines solve. Learn about Dispatchers in Kotlin, how we use Dispatchers to define Coroutine Context in Kotlin.
Topics covered -
1. How main thread works using Looper & Message Queue
2. Issue with Threads
3. What is Coroutine?
4. What is Coroutine Scope and Coroutine Context
5. What are Dispatchers?
Kotlin Coroutines Playlist-
• Kotlin Coroutines For ...
Complete Android Architecture Components Playlist -
• Android Architecture C...
Beginner series in Android Playlist (Hindi) -
• Android Tutorials Step...
Kotlin Beginners Tutorial Series -
• Kotlin Beginner Tutori...
For more info - visit the below link
www.cheezycode.com
We are social. Follow us at -
Facebook - / cheezycode
Twitter - / cheezycode
Instagram - / cheezycode

Опубликовано:

 

22 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 119   
@sandeepboyapati850
@sandeepboyapati850 3 года назад
Suggestion:- All the videos about coroutines on RU-vid are uploaded a year or more back. And none of them explain such clearly with such examples. It's getting very easy for me to catch the topic. All I can say is THANK YOU 🖤🖤🖤. Spend some money to make the content reach more people.
@junigates
@junigates Год назад
Sir, just a humble request please make a complete series on WorkManager, Services and BroadcastReceivers together explain their uses and their relations between them. Bundle of thanks to you. Stay blessed! Others please if agree hit like to escalate the need of this series.
@rakshachoudhary6292
@rakshachoudhary6292 2 года назад
I am quite amazed how someone could explain one of the difficult topic of android in such a beautiful way that it seems very easy.
@CheezyCode
@CheezyCode 2 года назад
Thank you Raksha
@rehandev7833
@rehandev7833 Год назад
Completed the entire playlist today and i think you create by far the most simplest explanation videos for Coroutines. I mean i do follow a couple of RU-vid Channels for android dev but trust me when i say this, you just seem to make every hard topic easy to understand as well as implement. I pray to God that you're channel becomes the most popular resource for Android Development. And you keep on growing and making more and more awesome videos. Cheers :)🥳
@sunildangi1228
@sunildangi1228 3 года назад
Boss.... Thank you so much... Awesome explanation... Your voice and teaching way is awesome.
@tabishkhan2012
@tabishkhan2012 3 года назад
Welcome back ❤️
@CheezyCode
@CheezyCode 3 года назад
Thank you 😊
@KDTechverse
@KDTechverse Год назад
This is insane ! I love this fact about learning and understanding concepts. You must've understood so well and must be pretty well experienced to put it this simply. Commendable job you're doing sir ! Thank you so much ! ❤
@anasyousuf485
@anasyousuf485 4 месяца назад
Teaching by rephrasing each topic in a different way makes me understand more clearly of everything, and that's the best approach. Feels like Hindi/Urdu should be used for us. ❤
@hiteshbitscs
@hiteshbitscs 2 года назад
you are such an incredible presenter... you made it very easy to understand very complex topic... power of mother tongue & your presentation are effective
@yashbhardwaj6808
@yashbhardwaj6808 Год назад
He explained the coroutines in very easy manner. Thanks
@TechSpot56
@TechSpot56 2 года назад
Thanks for making such a difficult topic so easy for us.❤️
@rakeshkushwaha3853
@rakeshkushwaha3853 Год назад
You explain in very easy understandble language🙏
@rkthebeast6910
@rkthebeast6910 3 года назад
mainey bohot video dekhey hai for understanding coroutine and to be pro in it including many famous foreign developer.... but the way you expalin and give extra knowledge is best
@CheezyCode
@CheezyCode 3 года назад
Thanks a lot.. 😊
@sakhti007
@sakhti007 2 года назад
you are the best teacher Sir, thankyou for the in depth knowledge of topics and crisp explanation of each and every part
@CheezyCode
@CheezyCode 2 года назад
Thanks a lot..🤘🏻
@rushikesh1203
@rushikesh1203 Год назад
You are a Gem. Just Completed Jetpack series. ❤
@yogeshb8368
@yogeshb8368 Год назад
Wish could give u one lakh likes..very well done man.
@iswherevivek
@iswherevivek 8 месяцев назад
bro u r best
@ihareshvaghela
@ihareshvaghela 6 месяцев назад
Thank you!
@MuhammadTahir1
@MuhammadTahir1 2 года назад
shukriya bhai itni achi explanation k liye
@CheezyCode
@CheezyCode 2 года назад
Thank you 😊
@Animefreak97
@Animefreak97 Год назад
My concept got cleared thx alot i was really confused
@junigates
@junigates Год назад
a simple and informative way of teaching, thanks a lot sir making us more skillful
@CheezyCode
@CheezyCode Год назад
Thanks and welcome
@junigates
@junigates Год назад
@@CheezyCode Sir, just a humble request please make a complete series on WorkManager, Services and BroadcastReceivers together explain their uses and their relations between them. Bundle of thanks to you.
@deepikabisht4325
@deepikabisht4325 Год назад
Thanks for the wonderful tutorial. Could you please explain the difference between calling a coroutine using CoroutineScope and global scope?
@govindchoudhary7311
@govindchoudhary7311 3 года назад
Thank you sir , Please make it fast fast video on Coroutine,
@CheezyCode
@CheezyCode 3 года назад
Fast fast mei content ki quality gir jayegi...mann se banane mei time lag rha hai --- shabd chunne mei time lag jata hai bro 😀
@sanjaytanti3085
@sanjaytanti3085 2 года назад
Great concept .thanks
@shubhamsharma6070
@shubhamsharma6070 Год назад
What's the song that plays in the end of this video? Catchy lyrics and music
@shalinikhosla971
@shalinikhosla971 3 года назад
Please upload more videos soon.. Thankyou for explaining in such a grt way
@CheezyCode
@CheezyCode 3 года назад
Thank you Shalini 👍
@samirgawas
@samirgawas 3 года назад
Thank you for making such a wonderful videos for us...It's really easy to understand Guru
@CheezyCode
@CheezyCode 3 года назад
Thank you 🤘
@rktechsoft605
@rktechsoft605 2 года назад
Easy to understand. Nice. Keep it up👍👍
@CheezyCode
@CheezyCode 2 года назад
Thanks a lot 😊
@poojari18
@poojari18 3 года назад
Excellent tutorial for Coroutines in Hindi. 👍👍
@CheezyCode
@CheezyCode 3 года назад
Thank you Poojaba for supporting 🤘
@shreyashachoudhary480
@shreyashachoudhary480 Год назад
Superb content!
@mubaraknative
@mubaraknative Год назад
6:18 this is known as Multi-Threading in Java creating multiple threads to run a long running task , which is bad compared to Coroutines , Threads are Expensive that are vary user mobile systems Great Explanation Bhai!!!
@CheezyCode
@CheezyCode Год назад
Thank you 🤘
@mubaraknative
@mubaraknative Год назад
@@CheezyCode 😀
@vivektpss62
@vivektpss62 2 года назад
Great work man ! You cleared my doubts ..
@CheezyCode
@CheezyCode 2 года назад
Thanks Vivek 🙂
@chetantailor3620
@chetantailor3620 3 года назад
Very informative video, Average how many videos will be there in the coroutines playlist?
@CheezyCode
@CheezyCode 3 года назад
7-8 ke kareeb mei cover hojayega
@thre4dripper
@thre4dripper 2 года назад
best explanation of coroutines
@CheezyCode
@CheezyCode 2 года назад
Thank you Ijlal
@satheeshguduri
@satheeshguduri 3 года назад
Well Explained, Thanks...
@CheezyCode
@CheezyCode 3 года назад
Thank you Satheesh 😀
@jeet198
@jeet198 Год назад
Nice tutorial. I want to ask that still no framework for java for such task?
@utkarshkumar1080
@utkarshkumar1080 2 года назад
Sir is this a complete course of kotlin Coroutines ? or is it enough for making projects with it and for interview ?
@CheezyCode
@CheezyCode 2 года назад
More than enough...
@utkarshkumar1080
@utkarshkumar1080 2 года назад
@@CheezyCode Thank You so Much Sir I love your channel so so so so so much 😍😍😍😍😍,the way you teach is outstanding 🤩🤩🤩🤩🤩🤩🤩
@nirmalrevar
@nirmalrevar 8 месяцев назад
Very informative video, is it possible for you to share PPT slide (or PDF) as-well, it helps for revision for interview purpose.
@CheezyCode
@CheezyCode 8 месяцев назад
Watch the video again 😂
@shivagiri7406
@shivagiri7406 Год назад
Amazing explanation.
@CheezyCode
@CheezyCode Год назад
Thanks Shiva
@shalenmathew
@shalenmathew Год назад
Great video
@schoolbari3859
@schoolbari3859 Год назад
Just great
@saifkhan2206
@saifkhan2206 2 года назад
bhaiiiiiii stay blessed
@CheezyCode
@CheezyCode 2 года назад
Thanks Saif
@Sikarwar0020
@Sikarwar0020 3 года назад
Well Explained Sir G 🤩
@CheezyCode
@CheezyCode 3 года назад
Thank you Vipin for always supporting ❤️
@codetheandroid
@codetheandroid 3 года назад
bhaiya i have a doubt plz reply ....Jaise hm long-running tasks like parsing JSON data from API ke liye background threads ka use krte h pr vo processes dubara re-execute hoti h agr hm rotate kre phone ko. uske liye kya solution h plz btao
@EducationSimplified
@EducationSimplified 3 года назад
Android Architecture, Separation of concern, Json parsing ka code fragment ki activity file m nii aeyga, json parsing ka code Fragment ki viewmodel file m aeyga
@EducationSimplified
@EducationSimplified 3 года назад
On phone rotation fragment ki activity file recreate hoti h par fragment ki view model file nii recreate hoti, view model file sustains through the phone rotations
@codetheandroid
@codetheandroid 3 года назад
@@EducationSimplified then what should i do? Put background tasks method in view model file?
@CheezyCode
@CheezyCode 3 года назад
Watch this series...you will get the idea of placing these pieces...
@codetheandroid
@codetheandroid 3 года назад
@@CheezyCode bro i am using java and these are in kotlin 😕
@ayanmalik1430
@ayanmalik1430 2 года назад
Apko agar GEM bole to tabhi kam soga sir!! Great Explanation !!
@CheezyCode
@CheezyCode 2 года назад
🙏
@nayannit
@nayannit 3 года назад
You are Awesome ♥️
@CheezyCode
@CheezyCode 3 года назад
Thanks 😊
@sanjana8267
@sanjana8267 2 года назад
Thank youuu sooo muchhh!!!!
@CheezyCode
@CheezyCode 2 года назад
You're welcome!
@hardcodeandroid
@hardcodeandroid 3 года назад
thanks sir
@dubaiworld5256
@dubaiworld5256 2 года назад
Awesome 👌
@CheezyCode
@CheezyCode 2 года назад
Thanks Dubai 😃
@simranaggarwal9352
@simranaggarwal9352 8 месяцев назад
Why the output is "1- DefaultDispatcher-worker-1" in case of Global scope when IO Dispatcher is used? Going by the output, it looks as if the Default dispatcher was used. Am I missing anything?
@CheezyCode
@CheezyCode 8 месяцев назад
coroutines launched with Dispatchers .IO are executed on a pool of threads named "DefaultDispatcher-worker-X' Same for Dispatcher.Default
@simranaggarwal9352
@simranaggarwal9352 8 месяцев назад
@@CheezyCode Got it, thanks!
@harshverma9616
@harshverma9616 2 года назад
Please make a video for uses of API using kotlin
@CheezyCode
@CheezyCode 2 года назад
??
@vikassharma-by4kw
@vikassharma-by4kw 2 года назад
i have one question. why you don't put Dispatcher inside the MainScope() instead of MainScope().launch(Dispatcher.Def).ike you Put GlobalScope(Dispatcher.Main) ?
@CheezyCode
@CheezyCode 2 года назад
no specific reason...we can use MainScope
@няє-в4н
@няє-в4н 2 года назад
Sir counter button click pe increment nahi ho raha kya karoo ?
@CheezyCode
@CheezyCode 2 года назад
What's the issue?
@няє-в4н
@няє-в4н 2 года назад
@@CheezyCode Ho. Gya increment but sir jessa aap ne kiya Onclick ke sath nhi ho raha tha... To me ne onCreate button listener ke through ho gya
@JaiSingh-nf6rm
@JaiSingh-nf6rm 3 года назад
Make video on how develop android app for all screen sizes with example ?
@CheezyCode
@CheezyCode 3 года назад
Constraint layout without hardcoding values....some of them require dp values but that can be handled by defining a layout.
@JaiSingh-nf6rm
@JaiSingh-nf6rm 3 года назад
@@CheezyCodeI know bro mai ehi jawab deta hu agee but muhje meree friend circle se eshi ke regarding bhout questions atee hai ke all screens sizes ke leyee android app kehse develop karee apka tohh youtube channel hai tohh agar app video banaa do ge bhout onsabhi ka help hoga aur mai agee share karr paoo ga aur apka content. Bhi ban jayee ga that's it
@kishorramani007
@kishorramani007 2 года назад
What's the use of "Default" dispatchers?
@CheezyCode
@CheezyCode 2 года назад
Requesting you to watch the series till the end...you will get the answer
@googlysahoo1397
@googlysahoo1397 2 года назад
How to know when to use CoroutineScope, globalscope and mainscope, also dispatcher.IO, dispatcher.main & dispatcher.default?
@CheezyCode
@CheezyCode 2 года назад
Coroutine Scope for Android - not required as we have component specific Scopes i.e. ViewModelScope, LifeCycleScope GlobalScope can be used if you want application level scope for your coroutines. For Android it is not recommended. For testing purposes you can use. MainScope is fine but use LifeCycleScope instead. Dispatchers.IO - when you want to do IO Operations. Dispatchers.Main - want to execute something on Main Thread. (UI Update in Android) Dispatchers.Default is for nomal computation. Hope this helps.
@googlysahoo1397
@googlysahoo1397 2 года назад
@@CheezyCode Thank you so much.
@arjunkataksh
@arjunkataksh 2 года назад
I am not able to understand what is the difference between Dispatchers and Coroutine Context ?
@CheezyCode
@CheezyCode 2 года назад
- Coroutines are run inside Coroutine Context - Context majorly tells you 2 things - Dispatchers + Job - That means, Coroutine Context includes Dispatcher and Job Element. - Dispatcher defines the thread, Job provides you handle to the coroutine. In simple words - jo mind mei baitha rkha hai - Context aapka Thread pool define karta hai jispe aapke coroutines run honge. Predefined thread pools hai jinko dispatchers bol rahe h. Dispatchers.IO, Dispatchers.Main etc. Baaki Job important concept hai - coroutines ko handle karne ke liye. Hope this helps.
@abromioitis
@abromioitis 3 года назад
Sir please make a playlist on handling background task (AsyncTask,Loders,Threads) they are very confusing and i don't find any sequential order resource from where i can learn them can ????? can you give me the link or can you make a new video series on this topic. like you have made on android system archetecture. #WithDueRespect
@CheezyCode
@CheezyCode 3 года назад
Will definitely try ❤️
@abromioitis
@abromioitis 3 года назад
@@CheezyCode thanks
@iiitsricity3171
@iiitsricity3171 2 года назад
Aap teacher nahi bhagwan ho🙏
@CheezyCode
@CheezyCode 2 года назад
Arre arre arre...🙏 Insaan shi banjaye...utna he kaafi hai 😂
@S_Crypto
@S_Crypto 3 года назад
Bhai Mera ❤️ Kahan hai?
@CheezyCode
@CheezyCode 3 года назад
Ye lo bro.... ❤️
@nikhilarora6043
@nikhilarora6043 2 года назад
Bro try to be a bit slow. It's difficult to follow you at this pace.
@CheezyCode
@CheezyCode 2 года назад
Sure will do that next time.
@kaushiksaha8479
@kaushiksaha8479 2 года назад
@@CheezyCode I also used to face difficulty to follow along...but then I just lessen the playback speed,no worry sir, you just teach at your own flow,what you are doing deserves huge round of applause .
@heavenlife5619
@heavenlife5619 11 месяцев назад
bhai tumhare maze h tumhe koi fire nhi kr sakte itna sab kuch aata h tumhe
Далее
повтори звуки животного 😱
00:52
Kotlin Coroutines 101 - Android Conference Talks
24:49
Просмотров 135 тыс.
Let, Also, Apply, Run, With - Kotlin Scope Functions
11:44