API reference › @evolu/common › NativeSqlite › retryWhileHeld
function retryWhileHeld<T, E>(attempt: () => Result<T, E>): Task<T, E>;
Defined in: packages/common/src/NativeSqlite.ts:399
Runs attempt at once and, until one returns ok, again 50 ms after an
attempt that returned an error, then after twice the previous delay, up to a
second. It returns the error of an attempt that ends
databaseHeldTimeout or more after the first started, as the web waits
for a database another context holds.