What's the most appropriate approach to executing ...
# squarelibraries
p
What's the most appropriate approach to executing non-async SQLDelight database transaction from a suspending method - just wrapping in
withContext(<http://Dispatchers.IO|Dispatchers.IO>)
?
👌 1
m
But this will fail as soon as wasmJs is supported by SQLDelight because there is no Dispatchers.IO in Wasm 😢.
k
You should probably invert the dependency on
<http://Dispatchers.IO|Dispatchers.IO>
up to
CoroutineContext
to address the above problem and also so that you could potentially have separate reader and writer threads, which is important if you're using SQLite