Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

poolifier

Package Overview
Dependencies
Maintainers
1
Versions
192
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

poolifier - npm Package Versions

1
1820

2.0.0

Diff

Changelog

Source

[2.0.0] - 2021-03-01

Bug fixes

  • Now a thread/process by default is not deleted when the task submitted take more time than maxInactiveTime configured (issue #70).

Breaking Changes

  • FullPool event is now renamed to busy.

  • maxInactiveTime on ThreadWorker default behavior is now changed, if you want to keep the old behavior set killBehavior to KillBehaviors.HARD. Find more details on our JSDoc.

  • maxTasks option on FixedThreadPool and DynamicThreadPool is now removed since is no more needed.

  • We changed some internal structures, but you shouldn't be too affected by them as these are internal changes.

Pool options types declaration merge

FixedThreadPoolOptions and DynamicThreadPoolOptions type declarations have been merged to PoolOptions<Worker>.

New export strategy
// Before
const DynamicThreadPool = require('poolifier/lib/dynamic')
// After
const { DynamicThreadPool } = require('poolifier/lib/dynamic')

But you should always prefer just using

const { DynamicThreadPool } = require('poolifier')
New type definitions for input data and response

For cluster worker and worker-thread pools, you can now only send and receive structured-cloneable data.
This is not a limitation by poolifier but Node.js.

Public property replacements

numWorkers property is now numberOfWorkers

Internal (protected) properties and methods renaming

These properties are not intended for end users

  • id => nextMessageId

These methods are not intended for end users

  • _chooseWorker => chooseWorker
  • _newWorker => createWorker
  • _execute => internalExecute
  • _chooseWorker => chooseWorker
  • _checkAlive => checkAlive
  • _run => run
  • _runAsync => runAsync
pioardi
published 2.0.0-beta.7 •

pioardi
published 2.0.0-beta.6 •

pioardi
published 2.0.0-beta.5 •

pioardi
published 2.0.0-beta.4 •

pioardi
published 2.0.0-beta.1 •

pioardi
published 1.2.1 •

pioardi
published 1.2.0 •

pioardi
published 1.1.0 •

Changelog

Source

[1.1.0] - 2020-05-21

Added

  • ThreadWorker support async functions as option
  • Various external library patches
pioardi
published 1.0.0 •

Changelog

Source

[1.0.0] - 2020-01-24

Added

  • FixedThreadPool implementation
  • DynamicThreadPool implementation
  • WorkerThread implementation to improve developer experience
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc