diff options
author | stephan <stephan@noemail.net> | 2022-09-17 21:13:26 +0000 |
---|---|---|
committer | stephan <stephan@noemail.net> | 2022-09-17 21:13:26 +0000 |
commit | e6f8a095325ed6b183aacafa8bd2b9cd7f69ae76 (patch) | |
tree | ba7285b0c75a8c74d499b87db05ba6b9984addfd /ext/wasm/sqlite3-opfs-async-proxy.js | |
parent | 0731554629912621874ec7ebd5ab307e270caef4 (diff) | |
download | sqlite-e6f8a095325ed6b183aacafa8bd2b9cd7f69ae76.tar.gz sqlite-e6f8a095325ed6b183aacafa8bd2b9cd7f69ae76.zip |
Generic cleanups in the OPFS sync/async proxy.
FossilOrigin-Name: f36bddbe54c3acbfaa958042e4d24724f130bdca551401033f9bc63f3da73492
Diffstat (limited to 'ext/wasm/sqlite3-opfs-async-proxy.js')
-rw-r--r-- | ext/wasm/sqlite3-opfs-async-proxy.js | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/ext/wasm/sqlite3-opfs-async-proxy.js b/ext/wasm/sqlite3-opfs-async-proxy.js index 88fdfa603..1ff939702 100644 --- a/ext/wasm/sqlite3-opfs-async-proxy.js +++ b/ext/wasm/sqlite3-opfs-async-proxy.js @@ -10,10 +10,10 @@ *********************************************************************** - A EXTREMELY INCOMPLETE and UNDER CONSTRUCTION experiment for OPFS: a - Worker which manages asynchronous OPFS handles on behalf of a - synchronous API which controls it via a combination of Worker - messages, SharedArrayBuffer, and Atomics. + An INCOMPLETE and UNDER CONSTRUCTION experiment for OPFS: a Worker + which manages asynchronous OPFS handles on behalf of a synchronous + API which controls it via a combination of Worker messages, + SharedArrayBuffer, and Atomics. Highly indebted to: @@ -109,8 +109,8 @@ const getDirForPath = async function f(absFilename, createDirs = false){ */ const storeAndNotify = (opName, value)=>{ log(opName+"() is notify()ing w/ value:",value); - Atomics.store(state.opBuf, state.opIds[opName], value); - Atomics.notify(state.opBuf, state.opIds[opName]); + Atomics.store(state.opSABView, state.opIds[opName], value); + Atomics.notify(state.opSABView, state.opIds[opName]); }; const isInt32 = function(n){ @@ -294,8 +294,8 @@ navigator.storage.getDirectory().then(function(d){ state.verbose = opt.verbose ?? 2; state.fileBufferSize = opt.fileBufferSize; state.fbInt64Offset = opt.fbInt64Offset; - state.opSab = opt.opSab; - state.opBuf = new Int32Array(state.opSab); + state.opSAB = opt.opSAB; + state.opSABView = new Int32Array(state.opSAB); state.opIds = opt.opIds; state.sq3Codes = opt.sq3Codes; Object.keys(vfsAsyncImpls).forEach((k)=>{ |