1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-18 10:21:03 +03:00

Remove a resolved TODO comment.

FossilOrigin-Name: 32fd4ac382f774189ac34f6fff80e55e6e56dd2aa67b0db88d5a88324f17f6ff
This commit is contained in:
stephan
2022-10-14 13:26:18 +00:00
parent d92c652ac1
commit 3e771c0f07
3 changed files with 9 additions and 18 deletions

View File

@@ -25,13 +25,6 @@
access to the sqlite3 JS/WASM bits, so any bits which it needs (most
notably SQLITE_xxx integer codes) have to be imported into it via an
initialization process.
Potential TODOs:
- When idle for "a long time", close the sync access handle in order
to release the lock, then re-open it on demand. Similarly, delay
fetching of the sync access handle until we need it. The intent
would be to help multi-tab access to a db avoid locking issues.
*/
'use strict';
const toss = function(...args){throw new Error(args.join(' '))};
@@ -42,8 +35,6 @@ if(self.window === self){
toss("This API requires navigator.storage.getDirectory.");
}
//warn("This file is very much experimental and under construction.",self.location.pathname);
/**
Will hold state copied to this object from the syncronous side of
this API.
@@ -161,7 +152,7 @@ const getSyncHandle = async (fh)=>{
try {
//if(1===i) toss("Just testing.");
//TODO? A config option which tells it to throw here
//randomly every now and then.
//randomly every now and then, for testing purposes.
fh.syncHandle = await fh.fileHandle.createSyncAccessHandle();
break;
}catch(e){
@@ -170,7 +161,7 @@ const getSyncHandle = async (fh)=>{
"attempts failed. ",fh.filenameAbs, ":", e.message);
throw e;
}
error("Error getting sync handle. Waiting",ms,
warn("Error getting sync handle. Waiting",ms,
"ms and trying again.",fh.filenameAbs,e);
Atomics.wait(state.sabOPView, state.opIds.xSleep, 0, ms);
}