VHVk Hoodainvkhooda24.hashnode.dev·May 23, 2023 · 2 min readCoroutine ContextCoroutineContext serves as a vital interface and a cornerstone of coroutines. A coroutine launches with a context and remains tied to it until the completion or cancellation of its job. It represents an indexed set of Element instances. An indexed...00
VHVk Hoodainvkhooda24.hashnode.dev·May 17, 2023 · 3 min readCoroutine DispatchersEnable us to decide on which thread (or pool of threads) a coroutine should be running ie. starting and resuming. Provided as a part of the coroutine context within a scope. CoroutineDispatcher implements the Element interface which holds a Key. T...00
VHVk Hoodainvkhooda24.hashnode.dev·May 16, 2023 · 3 min readCoroutine ScopeCoroutineScope interface encapsulates the CoroutineContext. Coroutine builders like launch{}, async{} are extensions on the coroutine scope. Coroutine library provides a function called CoroutineScope for initialization of the CoroutineScope. It ...00
VHVk Hoodainvkhooda24.hashnode.dev·May 15, 2023 · 2 min readKotlin CoroutinesCoroutine is a computer program component that makes it possible to execute a block of code concurrently. Coroutine works on a suspendable mechanism in which it suspends a piece of the program to execute on a separate worker thread while the rest of...00
VHVk Hoodainvkhooda24.hashnode.dev·May 7, 2023 · 1 min readCoroutines: Scope, Context, and DispatchersScope Coroutines are launched within a coroutine scope, which sets the execution boundary. The coroutine scope acts as a platform, providing the necessary context for launching and managing coroutines. Context The coroutine context contains cruc...00