a really simple mutex jsr.io/@mary/mutex
typescript jsr

mutex#

JSR | source code

a really simple mutex.

const mutex = new Mutex();

{
	using _lock = await mutex.acquire();

	// ... go about your day
}