MCPcopy Index your code
hub / github.com/apache/pouchdb / readLock

Function readLock

lib/index.js:5221–5233  ·  view source on GitHub ↗
(fun)

Source from the content-addressed store, hash-verified

5219
5220 // same as the writelock, but multiple can run at once
5221 function readLock(fun) {
5222 return function (...args) {
5223 db._queue.push({
5224 fun,
5225 args,
5226 type: 'read'
5227 });
5228
5229 if (db._queue.length === 1) {
5230 nextTick(executeNext);
5231 }
5232 };
5233 }
5234
5235 function formatSeq(n) {
5236 return ('0000000000000000' + n).slice(-16);

Callers 1

LevelPouchFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…