v1.0.0-rc6
JavaScript synchronization between workers (and main thread)
Attributes
Includes Deno configuration
Repository
Current version released
4 years ago
Versions
Worker Sync
JavaScript synchronization functions (mutex, semaphore) between workers (and the main thread).
Setup
NodeJS
Released under both npmjs & github packages:
Install:
npm
npm install @eyalsh/worker_syncyarn
yarn add @eyal-shalev/worker_syncimport (ES Modules):
import { Mutex, Semaphore } from "@eyalsh/worker_sync";require (CommonJS):
const { Semaphore, Mutex } = require("@eyalsh/worker_sync");Deno
The library is available to import from deno.land/x/worker_sync
import { Mutex, Semaphore } from "https://deno.land/x/worker_sync/mod.ts";Browser - Download
You can download compiled library from GitHub:
import { Mutex, Semaphore } from "/path/to/worker_sync.esm.min.js";Note: a bundled IIFE version also exist, if your application doesn’t support ES modules.
<script src="/path/to/worker_sync.iife.min.js"></script>
<script>
const {Semaphore, Mutex} = worker_sync;
</script>