In Kotlin Coroutines, want to create a reference for the current thread and use it later.
fun myFuncion(){
//save current Thread CoroutineScope
var currentCoroutineScope : CoroutineScope // <How to create?>
GlobalScope.launch {
//Do something 001
currentCoroutineScope .launch {
//Do something 002
}
}
}
Could anyone help with this?