Skip to content

v3.0.0

Choose a tag to compare

@b1411 b1411 released this 16 Jan 14:51
· 11 commits to main since this release

3.0.0 (2026-01-16)

  • feat!: replace Thread class with Thread.execute() static API (#4) (9f5300e)

Bug Fixes

  • increase Queue performance test timeout to handle CI variability [skip ci] (afe4e7b)

BREAKING CHANGES

  • Removed old Thread class constructor API. Users must
    migrate from 'new Thread(fn, args)' to 'Thread.execute(fn, args)'.
  • Removed Thread class constructor (src/primitives/Thread.ts)
  • Removed ThreadV2 alias, now Thread is the main API
  • Removed ThreadFactory, functions inlined into Thread object
  • Thread is now a namespace object with static methods: execute(),
    persistent(), prewarm(), clearPool()
  • Updated all tests, examples, and benchmarks to use new API
  • Fixed ThreadPool terminate() to reject queued tasks
  • Added typecheck script to package.json

Migration guide:
Before: const thread = new Thread(() => 42); await thread.join(); After:
await Thread.execute(() => 42).join();

Co-authored-by: Rakhmat 232435084+Kemel-Army@users.noreply.github.com