MCPcopy Index your code
hub / github.com/GraphiteEditor/Graphite / drain_queue

Function drain_queue

document/container/src/backends/opfs.rs:215–264  ·  view source on GitHub ↗

Apply every queued mutation to disk, in FIFO order, until the queue is empty, then mark the worker idle. Spawned once via [`kick_worker`] and runs as the sole mutator; the awaited read paths wait on a [`Mutation::Barrier`] rather than draining themselves, so there is never more than one drainer. Consecutive appends to the same path are coalesced into one combined append. Each `createWritable` on

(inner: Arc<Mutex<Inner>>)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 1

kick_workerFunction · 0.70

Calls 7

append_fileFunction · 0.85
remove_fileFunction · 0.85
lockMethod · 0.80
write_fileFunction · 0.70
is_not_foundFunction · 0.70
cloneMethod · 0.45
sendMethod · 0.45

Tested by

no test coverage detected