Expand description
Global concurrency limiter for lean-ctx processes.
Prevents runaway CPU usage by limiting the number of concurrent lean-ctx
processes to MAX_CONCURRENT. Each process acquires a numbered lock slot
under ~/.lean-ctx/locks/. If all slots are taken, the caller gets None.
Structs§
Functions§
- acquire
- Try to acquire one of N concurrent process slots.
Returns
Noneif all slots are occupied (= too many lean-ctx already running). - active_
count - Checks how many slots are currently held (best-effort).