Join Slack
Powered by
<https://github.com/Kotlin/kotlinx.coroutines/issu...
# android
s
Siddharth Sharma
12/17/2022, 4:13 PM
https://github.com/Kotlin/kotlinx.coroutines/issues/3555#issuecomment-1356315434
hi can anybody answer this question here?
k
kenkyee
12/17/2022, 4:50 PM
sounds like you should use a semaphore or mutex but also it's pretty unusual to need to do that w/ firestore:
https://kotlinlang.org/api/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.sync/-semaphore/
s
Siddharth Sharma
12/18/2022, 4:49 AM
@kenkyee
also does with context causes any overhead? And can it happen that in my suspend fun line 1 was executing at thread 1 and line 5 executes at another thread
k
kenkyee
12/18/2022, 1:39 PM
coroutines can resume in different threads.
s
Siddharth Sharma
12/18/2022, 1:41 PM
Doesn't that make things more complicated?
k
kenkyee
12/18/2022, 1:41 PM
it's the way it works
blob shrug
s
Siddharth Sharma
12/18/2022, 1:42 PM
My reaction is your dp
5
Views
Open in Slack
Previous
Next