Dico
03/09/2019, 1:09 PMwithScope instead of withContext. Now you have to write withContext(myScope.coroutineContext) but, given the intended purpose 😉 of CoroutineScope, I feel there should be a scope variant of it.Dias
03/09/2019, 1:34 PMDico
03/09/2019, 1:43 PMDico
03/09/2019, 1:46 PMwithScope can give you 2 parents. I assume withContext makes the paraneter's Job take precedence. Just entertaining some thoughts.elizarov
03/09/2019, 2:21 PMDico
03/09/2019, 2:31 PMCoroutineScope. Maybe that's how it should be, and maybe that's why it's good that withScope doesn't exist.elizarov
03/09/2019, 2:32 PMDico
03/09/2019, 2:36 PMelizarov
03/09/2019, 2:37 PMDico
03/09/2019, 2:38 PMDico
03/09/2019, 2:40 PMDico
03/09/2019, 2:42 PMDico
03/09/2019, 2:44 PMMainScope.launch {
vertexBuffer.sync() // upload to GPU
}.join() // ensure it's uploaded before next iterationDico
03/09/2019, 2:45 PMwithContext like mechanism would be more elegant. That's all.