Skip to main content

Module index_lock_wait_host

Module index_lock_wait_host 

Source
Expand description

The host side effects of the index-lock wait: /proc reads, sleeps, randomness and standard error. What: The host side effects of the index-lock wait: /proc and Git-free lock reads, real sleeps, operating-system randomness and standard error. Why: WaitEffects is the seam the controls replace; this is what the executable runs.

In TS you’d write (pseudocode):

const HOST_WAIT_EFFECTS = { gather, sleep: wait, random: Math.random, report: stderr.write, now: performance.now };

Structs§

HostWaitEffects
What: The host effects for one wait on one real index. Why: The clock starts when the wait does, so now_ms measures the wait’s own time.

Functions§

lock_path_of
What: The lock path of a real index. Why: Git names the lock <index>.lock beside the index.