Great info. So the KMP-compatible version of this ...
# squarelibraries
j
Great info. So the KMP-compatible version of this would be:
Copy code
val writeDispatcher = newSingleThreadContext("db-writes")
val writeScope = CoroutineScope(writeDispatcher)
and then if you close your database:
Copy code
database.close()
writeScope.cancel()
writeDispatcher.close()