Gala Bill
02/21/2026, 9:01 AMprivate fun editListA() {
viewModelScope.launch {
val newList = Api.getList() //suspending
mutableState.value = mutableState.value.copy(
listA = newList
)
}
}
private fun editListB() {
viewModelScope.launch {
val newList = Api.getList() //suspending
mutableState.value = mutableState.value.copy(
listB = newList
)
}
}
Also claude code and chatgpt is trying to convince me that there is a race condition but I still can't understand why it would be.
Article linkstreetsofboston
02/21/2026, 11:08 AMGala Bill
02/21/2026, 1:22 PMstreetsofboston
02/21/2026, 1:37 PMMutex.Gala Bill
02/21/2026, 1:53 PMstreetsofboston
02/21/2026, 1:59 PMGala Bill
02/21/2026, 2:05 PMstreetsofboston
02/21/2026, 2:06 PMGala Bill
02/21/2026, 2:08 PMstreetsofboston
02/21/2026, 2:09 PMGala Bill
02/21/2026, 2:12 PM