Concurrency Utilities

Keyed concurrency utilities for parallel testing

Keyed concurrency utilities for fine-grained synchronization.

KeyedMutexManager

Provides mutual exclusion per key using static methods.

KeyedMutexManager.lock("key");
try {
    // Critical section for this key
} finally {
    KeyedMutexManager.unlock("key");
}

KeyedLatchManager

Count-down latches per key using static methods.

KeyedLatchManager.createLatch("key", 3); // Count of 3
KeyedLatchManager.countDown("key");
KeyedLatchManager.await("key"); // Waits until count reaches 0

KeyedSemaphoreManager

Semaphores per key for resource limiting using static methods.

KeyedSemaphoreManager.createSemaphore("resource", 5); // Max 5 permits
KeyedSemaphoreManager.acquire("resource");
try {
    // Use resource
} finally {
    KeyedSemaphoreManager.release("resource");
}

See Also


Last modified February 15, 2026: Version 1.0.0 (#232) (5914840e)