@eyalsh/worker_sync
TypeScript icon, indicating that this package has built-in type declarations

1.0.0-rc6 • Public • Published

Worker Sync

Latest Version Test codecov nodejs minimum version License: GPL v3

JavaScript synchronization functions (mutex, semaphore) between workers (and the main thread).

Setup

NodeJS

Released under both npmjs & github packages:

npmjs.com:@eyalsh/worker_sync github.com:@Eyal-Shalev/worker_sync

Install:

npm
npm install @eyalsh/worker_sync
yarn
yarn add @eyal-shalev/worker_sync

import (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:

  • Latest Release
  • All Releases
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>

Package Sidebar

Install

npm i @eyalsh/worker_sync

Weekly Downloads

57

Version

1.0.0-rc6

License

GPL-3.0-or-later

Unpacked Size

60.8 kB

Total Files

32

Last publish

Collaborators

  • eyalsh