Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/yyx990803/okie

Dead simple worker threads pool
https://github.com/yyx990803/okie

Last synced: 6 days ago
JSON representation

Dead simple worker threads pool

Awesome Lists containing this project

README

        

# Okie

> "Okie dokie, work work"

Dead simple worker threads pool.

```js
const { Worker } = require('okie')

const worker = new Worker(n => n + 1, {
max: 3 // defaults to os.cpus().length - 1
})

;(async () => {
const result = await worker.run(1)
console.log(result) // logs "2"

worker.stop()
})()
```