Skip to content

Commit

Permalink
Add tryLock() to the README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
havelessbemore committed May 13, 2024
1 parent 0da1dcb commit f94b1f4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit f94b1f4

Please sign in to comment.