KiteLock
A minimal reentrant mutual-exclusion lock (T-16). JVM/Android wrap ReentrantLock, native targets a reentrant atomic spinlock, JS/Wasm are single-threaded no-ops. Use through withLock.
Engine-internal plumbing that must cross module boundaries (the handlers synchronize their document caches with it); not a public concurrency API.
A minimal reentrant mutual-exclusion lock (T-16). JVM/Android wrap ReentrantLock, native targets a reentrant atomic spinlock, JS/Wasm are single-threaded no-ops. Use through withLock.
Engine-internal plumbing that must cross module boundaries (the handlers synchronize their document caches with it); not a public concurrency API.
Single-threaded target: locking is a no-op.
A minimal reentrant mutual-exclusion lock (T-16). JVM/Android wrap ReentrantLock, native targets a reentrant atomic spinlock, JS/Wasm are single-threaded no-ops. Use through withLock.
Engine-internal plumbing that must cross module boundaries (the handlers synchronize their document caches with it); not a public concurrency API.
Reentrant spinlock over a single atomic owner word. POSIX mutex structs differ per native family (structs on Apple/Linux, integer typedefs on MinGW), so a portable pure-atomics lock beats four platform actuals here. Spinning is acceptable because every critical section under this lock is a few map operations; the parse work itself runs outside it (T-16). After a short spin budget the waiter yields: an empty spin on Darwin's QoS scheduler can starve a lower-priority holder scheduled on the same core (the failure mode that got OSSpinLock deprecated).
Single-threaded target: locking is a no-op.
Single-threaded target: locking is a no-op.