Skip to content

Commit

Permalink
doc: fix a misprint about timeout parameter description
Browse files Browse the repository at this point in the history
  • Loading branch information
izure1 committed Nov 23, 2024
1 parent 0eb3d00 commit c193111
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ await ryoiki.readLock([0, 10], async (_lockId) => {
- `callback`: Async function executed after lock is acquired.
- `lockId`: Unique ID for the current lock.
- `timeout`: Optional timeout in milliseconds. If the lock cannot be acquired within the specified time, the operation will throw a timeout error.
- Defaults to `Infinity` (wait indefinitely).
- Defaults to `undefined` (wait indefinitely).
- **Returns**: The result of the callback function.

### `writeLock(range?: [number, number], callback: (lockId: string) => Promise<T>, timeout?: number): Promise<T>`
Expand All @@ -117,7 +117,7 @@ await ryoiki.readLock([0, 10], async (_lockId) => {
- `callback`: Async function executed after lock is acquired.
- `lockId`: Unique ID for the current lock.
- `timeout`: Optional timeout in milliseconds. If the lock cannot be acquired within the specified time, the operation will throw a timeout error.
- Defaults to `Infinity` (wait indefinitely).
- Defaults to `undefined` (wait indefinitely).
- **Returns**: The result of the callback function.

### `readUnlock(lockId: string): void`
Expand Down

0 comments on commit c193111

Please sign in to comment.