Socket
Socket
Sign inDemoInstall

nanolith

Package Overview
Dependencies
1
Maintainers
1
Versions
95
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.3.9-beta3 to 0.3.9

2

package.json

@@ -1,1 +0,1 @@

{"name":"nanolith","version":"0.3.9-beta3","type":"module","author":"Matt Stephens","description":"Multi-threading in no time with seamless TypeScript support.","license":"MIT","repository":{"type":"git","url":"https://github.com/mstephen19/nanolith"},"homepage":"https://github.com/mstephen19/nanolith#readme","bugs":{"url":"https://github.com/mstephen19/nanolith/issues"},"main":"./build/index.js","exports":"./build/index.js","dependencies":{"tiny-typed-emitter":"^2.1.0"},"keywords":["nanoservices","nanoservice","microservice","microservices","thread","threads","threadz","multithreading","thread pool","child process","workers","worker","worker threads","piscina","pool","threading","concurrency","parallel","performance","scaling","scale","async"]}
{"name":"nanolith","version":"0.3.9","type":"module","author":"Matt Stephens","description":"Multi-threading in no time with seamless TypeScript support.","license":"MIT","repository":{"type":"git","url":"https://github.com/mstephen19/nanolith"},"homepage":"https://github.com/mstephen19/nanolith#readme","bugs":{"url":"https://github.com/mstephen19/nanolith/issues"},"main":"./build/index.js","exports":"./build/index.js","dependencies":{"tiny-typed-emitter":"^2.1.0"},"keywords":["nanoservices","nanoservice","microservice","microservices","thread","threads","threadz","multithreading","thread pool","child process","workers","worker","worker threads","piscina","pool","threading","concurrency","parallel","performance","scaling","scale","async"]}

@@ -5,3 +5,3 @@ # Nanolith

> Nanolith now supports nested parent threads. Spawn threads from other threads, more threads from those threads, and so on!
> Nanolith now supports nested parent threads. Spawn threads from other threads, more threads from those threads, and so on! 💪

@@ -325,3 +325,3 @@ [![TypeScript](https://badgen.net/badge/-/TypeScript/blue?icon=typescript&label)](https://www.typescriptlang.org/) [![CircleCI](https://circleci.com/gh/mstephen19/nanolith.svg?style=svg)](https://app.circleci.com/pipelines/github/mstephen19/nanolith) [![Install size](https://packagephobia.com/badge?p=nanolith@latest)](https://packagephobia.com/result?p=nanolith@latest)

pool.setConcurrency(ConcurrencyOption.Half);
// Default concurrency. One thread per core (x1).
// Default concurrency. Two threads per core (x2).
pool.setConcurrency(ConcurrencyOption.Default);

@@ -339,6 +339,14 @@ // One thread per core.

// Ten threads per core.
// Warning: This is overkill.
// Warning: This could be overkill.
pool.setConcurrency(ConcurrencyOption.x10);
```
Access to the pool's default concurrency for the current machine's resources can be accessed like so:
```typescript
import { getDefaultPoolConcurrency } from 'nanolith';
console.log(getDefaultPoolConcurrency)
```
### `pool` properties & methods

@@ -345,0 +353,0 @@

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc