Offload functions to worker threads with shared memory primitives for Node.js.
8
fork

Configure Feed

Select the types of activity you want to include in your feed.

chore: version 1.3.0

+25 -24
-23
.changeset/try-lock-variants.md
··· 1 - --- 2 - 'moroutine': minor 3 - --- 4 - 5 - Synchronous `try*` variants for shared locks 6 - 7 - **New methods on `Mutex` and `RwLock`**: 8 - 9 - ```ts 10 - // Non-blocking, single-attempt acquisition. 11 - // Returns a disposable guard on success, `null` on contention. 12 - mutex.tryLock(); // MutexGuard | null 13 - rwlock.tryReadLock(); // ReadGuard | null 14 - rwlock.tryWriteLock(); // WriteGuard | null 15 - ``` 16 - 17 - Each makes a single atomic CAS attempt — no waiting, no retry. Composes with `using` since `null` skips dispose registration: 18 - 19 - ```ts 20 - using guard = mu.tryLock(); 21 - if (!guard) return; // held elsewhere, nothing to dispose 22 - // ...critical section; auto-unlock on scope exit 23 - ```
+24
CHANGELOG.md
··· 1 1 # moroutine 2 2 3 + ## 1.3.0 4 + 5 + ### Minor Changes 6 + 7 + - c9a1794: Synchronous `try*` variants for shared locks 8 + 9 + **New methods on `Mutex` and `RwLock`**: 10 + 11 + ```ts 12 + // Non-blocking, single-attempt acquisition. 13 + // Returns a disposable guard on success, `null` on contention. 14 + mutex.tryLock(); // MutexGuard | null 15 + rwlock.tryReadLock(); // ReadGuard | null 16 + rwlock.tryWriteLock(); // WriteGuard | null 17 + ``` 18 + 19 + Each makes a single atomic CAS attempt — no waiting, no retry. Composes with `using` since `null` skips dispose registration: 20 + 21 + ```ts 22 + using guard = mu.tryLock(); 23 + if (!guard) return; // held elsewhere, nothing to dispose 24 + // ...critical section; auto-unlock on scope exit 25 + ``` 26 + 3 27 ## 1.2.2 4 28 5 29 ### Patch Changes
+1 -1
package.json
··· 1 1 { 2 2 "name": "moroutine", 3 - "version": "1.2.2", 3 + "version": "1.3.0", 4 4 "repository": { 5 5 "type": "git", 6 6 "url": "git@tangled.org:divy.zone/moroutine"