From f94b1f4fb0b8cb7a2838583ce74ee29709244a96 Mon Sep 17 00:00:00 2001 From: havelessbemore Date: Sun, 12 May 2024 21:14:13 -0400 Subject: [PATCH] Add tryLock() to the README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 000e606..90cfe7c 100644 --- a/README.md +++ b/README.md @@ -66,6 +66,8 @@ yarn add semafy - **SharedLock**: Wraps a `SharedLockable` object (e.g. `SharedMutex`) to create a shared lock. Calls to `lock`, `unlock`, etc will acquire a shared lock instead of an exclusive lock. +- **tryLock()**: Tries to sequentially acquire all provided locks. If any lock fails, the process is stopped, and any acquired locks are released in reverse order. + ### Condition Variable - **ConditionVariable**: Allows agents to wait for specific conditions, tightly integrated with mutexes for state management.