in src/TransactionLockHelper.ts [209:231]
private _cleanTransaction(token: TransactionToken) {
if (token.exclusive) {
each(token.storeNames, (storeName) => {
if (!this._exclusiveLocks[storeName]) {
throw new Error(
"Missing expected exclusive lock for store: " + storeName
);
}
this._exclusiveLocks[storeName] = false;
});
} else {
each(token.storeNames, (storeName) => {
if (!(this._readOnlyCounts[storeName] > 0)) {
throw new Error(
"Missing expected readonly lock for store: " + storeName
);
}
this._readOnlyCounts[storeName]--;
});
}
this._checkNextTransactions();
}