martmists
11/24/2024, 4:12 PMcoroutineScope { // launch here }
but in some cases those jobs don't finish before the coroutineScope block ends.Sam
11/24/2024, 4:17 PMJob
as an argument to launch
or async
, which would replace the normal parent job from the context.Sam
11/24/2024, 4:18 PMawaitAll
function, but it sounds like it'd be better to fix the underlying problem than use awaitAll
as a workaroundmartmists
11/24/2024, 4:18 PMcoroutineScope
and launch
, no weird parameters passed to them.Sam
11/24/2024, 4:19 PMcoroutineScope
block returns?martmists
11/24/2024, 4:21 PMSam
11/24/2024, 4:27 PMbuildJsonObject
safe for concurrent access? If not, it could just be that concurrent updates are racing and overwriting one another.martmists
11/24/2024, 4:29 PMSam
11/24/2024, 4:31 PMSam
11/24/2024, 4:35 PMlaunch
block are actually suspending? It's hard to tell from the GH listing.martmists
11/24/2024, 4:36 PMprop.resolver
call and interfaceMap[...].invoke
are suspending, as well as the wrapper
call.Sam
11/24/2024, 4:39 PMcoroutineScope {
val keyValuePairs = produce {
for (field in fields) launch {
val keyValuePair = TODO()
send(keyValuePair)
}
}
buildJsonObject {
for ((key, value) in keyValuePairs) put(key, value)
}
}
☝️ untested improv code that I didn't even check to see if it compilesSam
11/24/2024, 4:40 PMmartmists
11/24/2024, 5:55 PM