diff --git a/datastore/threads/threadproxyds.nim b/datastore/threads/threadproxyds.nim index c589998..8425caa 100644 --- a/datastore/threads/threadproxyds.nim +++ b/datastore/threads/threadproxyds.nim @@ -90,7 +90,7 @@ template dispatchTask(self: ThreadDatastore, of Sqlite: var ds = self.backend.sql proc runTask() = - `fn`(addr ctx, ds) + self.tp.spawn `fn`(addr ctx, ds) runTask() await wait(ctx.signal)