Join Slack
Powered by
can I use blocking calls (i.e. to sql db) on a "Co...
# coroutines
w
wineluis
12/19/2017, 9:46 PM
can I use blocking calls (i.e. to sql db) on a "Cooperative single-thread multitasking" environment? see
https://github.com/Kotlin/kotlin-coroutines/blob/master/kotlin-coroutines-informal.md#cooperative-single-thread-multitasking
g
gildor
12/20/2017, 12:19 AM
Blocking call in a single thread will block thread and all tasks and coroutines, so don't think that it's good idea. In single thread you should use async API, some non-blocking SQL API for your example
4
Views
Open in Slack
Previous
Next