Kotlin Coroutines: coroutineScope vs. runBlocking (Tutorial)

preview_player
Показать описание
To keep it simple: runBlocking blocks, and coroutineScope suspends, and for that reason, runBlocking is a normal function, while coroutineScope remains a suspend function.
​​​​
Рекомендации по теме
Комментарии
Автор

Great example and explanation, thank you

urlton
Автор

awesome video! great and concise explaination!

jackli
Автор

Great job, like Codinginflow or Philipp(AndroidDevs)) so don`t stop

BlackJarProduction
Автор

Great! BTW in pervious lecture you said suspend function can be called inside an other suspend function or inside run blocking but here you make the whole main function as suspend function why ?

Ahmad.
Автор

Does runblock only block the current execution? So for example you have a web service that has multiple callers, will it by block in the same way as java synchronized keywork

ssswdon
Автор

question - if the runblocking is supposed to block execution, how is it printing the "Cancelling Job" message right after the "Starting runBlocking..." message. If its getting spun on the same thread, shouldn't runblock block and cancellation message not be printed? Am a bit confused about how the thread is switching execution code point? Appreciate your response.

PavanKumarKurimilla
Автор

How can you return anything from the Job? What is the way to communicate ?
All exam ples are just showing Logs, I wish i find a real example

olegalekos
Автор

can you share your gradle dependecies
i am not able to use withContext

champion.king.
Автор

Please make a video on how to consume GraphQl api with Apollo using MVVM and coroutines with repository pattern

MrRahulmalik
Автор

you are moving like a train..hard to grasp

visitor_t-wp
Автор

I dont know what makes yiu think this makes sense !

kirwakelvinkering
welcome to shbcf.ru