mirror of
https://github.com/sqlite/sqlite.git
synced 2025-07-30 19:03:16 +03:00
OPFS concurrency tester: ensure that the work interval timer does not overlap with the work time.
FossilOrigin-Name: 8f2076553bc486ea6a17934695ecc02217461af2082d891697b62aab89bd1b43
This commit is contained in:
@ -70,11 +70,12 @@ self.sqlite3InitModule().then(async function(sqlite3){
|
||||
}
|
||||
};
|
||||
if(1){/*use setInterval()*/
|
||||
interval.handle = setInterval(async ()=>{
|
||||
setTimeout(async function timer(){
|
||||
await doWork();
|
||||
if(interval.error || maxIterations === interval.count){
|
||||
clearInterval(interval.handle);
|
||||
finish();
|
||||
}else{
|
||||
setTimeout(timer, interval.delay);
|
||||
}
|
||||
}, interval.delay);
|
||||
}else{
|
||||
|
Reference in New Issue
Block a user