3 ms·
SQLite WASM uses SharedArrayBuffers and Atomics to turn async OPFS apis into blocking APIs (really just _one_ api -- getSyncAccessHandle) Given the use of Shar
by tantaman 4y ago
SQLite WASM uses SharedArrayBuffers and Atomics to turn async OPFS apis into blocking APIs (really just _one_ api -- getSyncAccessHandle)
Given the use of SharedArrayBuffers and that SharedArrayBuffers can't be used in a shared worker (funny), SQLite WASM doesn't work in shared workers.
If getSyncAccessHandle was made synchronous then maybe everything would just work. It'd also improve SQLite WASM perf by 30% according to their measurements [1]
[1] https://sqlite.org/forum/forumpost/af64f73911e5410cf9a640c9e3713df2eb7963c7f08d954738a5f456a5d8a4f1 https://sqlite.org/forum/forumpost/af64f73911e5410cf9a640c9e...