SkipLabs / skdb

SKDB is an embedded SQL database that stays in sync.

Home Page:https://skdb.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Creating an SKDB instance as a worker causes JS to hang

gregsexton opened this issue · comments

Repro:

import { createSkdb } from "skdb";
const db = await createSkdb({ asWorker: true });

If you change asWorker to false the node process will exit cleanly, otherwise it hangs.

The skdb type has a closeConnection method. We should probably change this to close() which should close any conns, other resources, and the worker if needed.

This is a low hanging one if someone fancies a quick win.