# @livekit/mutex

> Tiny mutex helper

Latest version **1.1.1** (published 2024-11-25) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install @livekit/mutex
pnpm add @livekit/mutex
yarn add @livekit/mutex
bun add @livekit/mutex
```

## Health

**Score 40/100 (D)** — status: maintenance-mode.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: stale; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.1 |
| Published | 2024-11-25 |
| First published | 2024-10-15 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 23.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 4 |
| Maintainers | rdsa, thedavidzhao, feepslk, matkam_livekit, raja-livekit, livekitherzog, lukasio, paulwe, dliulk, lk_hiroshi, dc-livekit, cnderrauber, benjaminlivekit, danm_livekit, shishir.gowda, duanweiwei, ocupe_livekit, cacheonly, sfkat, shayps, chrisackermann, bcherrylk, kuba--, enbyspace, rektdeckard, lk-mike, braunsteinlivekit, s-hamdananwar |

## Links

- npm: https://www.npmjs.com/package/@livekit/mutex
- Repository: https://github.com/livekit/ts-mutex
- Homepage: https://github.com/livekit/ts-mutex#readme
- Issues: https://github.com/livekit/ts-mutex/issues
- npm.io page: https://npm.io/package/@livekit/mutex

## Recent versions

- 1.1.1 (latest) — 2024-11-25
- 1.1.0 — 2024-11-04
- 1.0.0 — 2024-10-15

## README

## Installation

```
pnpm add @livekit/mutex
```

## Usage

```ts
import { Mutex } from '@livekit/mutex';

const myLock = new Mutex();

const unlock = await myLock.lock();

try {
    ...
}
finally {
    unlock();
}
```

---
_Source: https://npm.io/package/@livekit/mutex · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
