Rafa
09/07/2019, 3:31 PMGlobalScope.launch {
Log.d("rafa", "thread:${Thread.currentThread()}") // this prints Thread[DefaultDispatcher-worker-1,5,main]
someTextView.text = "new test"
}
Does anyone know why that doesn't crash ^? Even though it's changing text in the UI on a worker thread?streetsofboston
09/07/2019, 3:47 PMAdam Powell
09/07/2019, 4:39 PMRafa
09/07/2019, 6:31 PMAdam Powell
09/07/2019, 8:34 PMRafa
09/07/2019, 8:39 PMstreetsofboston
09/07/2019, 9:41 PMMutableLiveData::setValue
)
But the most just do what they do and, if called on a background thread, may fail in an undetermined way.