openWorkerConnection

suspend fun openWorkerConnection(taskName: String, registrarModule: String, filename: String): SQLiteConnection

Opens a connection in its own worker thread. The thread imports registrarModule, which registers a SQLiteConnectionTask as taskName. Requests and rows go over a MessagePort by structured clone.

The port keeps message order and the worker handles requests one by one, so a statement is prepared, bound and run or stepped in a single round-trip, and resetting or finalizing it needs no reply at all.