jlongster / absurd-sql

sqlite3 in ur indexeddb (hopefully a better backend soon)
MIT License
4.15k stars 101 forks source link

Using absurd-sql starting from a web worker, rather than main thread. #26

Open AdventureBeard opened 2 years ago

AdventureBeard commented 2 years ago

My application's domain logic is already in a web-worker; is the additional worker abstraction necessary in this case? Is there a trick to using absurd-sql in this manner? I'm unable to get it to start, as it gets stuck waiting at dist/indexeddb-backend.js:809, in the waitRead function of the Writer.

EDIT: Oh I see, starting to build my mental model of this thing. The indexeddb-backend wants a thread to itself for this very reason. In my case, I use ThreadsJS and they still don't seem to play nicely.