nanolith
Advanced tools
Comparing version 0.3.9-beta3 to 0.3.9
@@ -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 @@ |
Empty package
Supply chain riskPackage does not contain any code. It may be removed, is name squatting, or the result of a faulty package publish.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
700
31894
3
0
2