# @vscode/windows-mutex

> Expose the Windows CreateMutex API to Node.JS

Latest version **0.5.3** (published 2026-01-09) · MIT license · 0 weekly downloads

## Install

```sh
npm install @vscode/windows-mutex
pnpm add @vscode/windows-mutex
yarn add @vscode/windows-mutex
bun add @vscode/windows-mutex
```

## Health

**Score 60/100 (C)** — status: stable.

Positive: has types; no vulnerabilities; high maintenance score; high quality score.

Warnings: low downloads; no esm support; pre 1.0.

## Facts

| | |
|---|---|
| Version | 0.5.3 |
| Published | 2026-01-09 |
| First published | 2023-03-16 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 10.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | yes |
| GitHub stars | 35 |
| Author | Microsoft |
| Maintainers | kaimaetzel, lszomoru, alexandrudima, sbatten, joaomoreno.ms, microsoft1es, rebornix, vscode-bot |

## Links

- npm: https://www.npmjs.com/package/@vscode/windows-mutex
- Repository: https://github.com/microsoft/node-windows-mutex
- Issues: https://github.com/microsoft/node-windows-mutex/issues
- npm.io page: https://npm.io/package/@vscode/windows-mutex

## Dependencies (2)

- [bindings](https://npm.io/package/bindings.md) ^1.5.0
- [node-addon-api](https://npm.io/package/node-addon-api.md) 7.1.0

## Recent versions

- 0.5.3 (latest) — 2026-01-09
- 0.5.2 — 2025-11-25
- 0.5.1 — 2025-11-25
- 0.5.0 — 2024-02-01
- 0.4.4 — 2023-06-05
- 0.4.3 — 2023-04-24
- 0.4.2 — 2023-03-16

## README

# windows-mutex

[![Build Status](https://dev.azure.com/vscode/node-windows-mutex/_apis/build/status/microsoft.node-windows-mutex?branchName=main)](https://dev.azure.com/vscode/node-windows-mutex/_build/latest?definitionId=23&branchName=main)

[![Build Status](https://dev.azure.com/monacotools/Monaco/_apis/build/status/npm/windows-mutex?repoName=microsoft%2Fnode-windows-mutex&branchName=main)](https://dev.azure.com/monacotools/Monaco/_build/latest?definitionId=464&repoName=microsoft%2Fnode-windows-mutex&branchName=main)

[![npm version](https://badge.fury.io/js/@vscode/windows-mutex.svg)](https://badge.fury.io/js/@vscode/windows-mutex)

Expose the Windows CreateMutex API to Node.JS.

## Installation

`@vscode/windows-mutex` will only compile in Windows machines, so it is advisable
to use the `--save-optional` flag and wrap the
`require('@vscode/windows-mutex')` call in a `try {} catch {}` block, in case your
code also runs on other platforms.

```
npm install --save-optional @vscode/windows-mutex
```

## Usage

```javascript
import { Mutex } from '@vscode/windows-mutex';

var mutex = new Mutex('my-mutex');
console.log(mutex.isActive());
mutex.release();
```

## Development

Publishing to NPM is automated via CI. As soon as a tag is pushed to the repo, that version will be built and published to NPM.

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