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

enqueue-work

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

enqueue-work

A Node.js child process worker library

  • 0.0.4
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2
decreased by-66.67%
Maintainers
1
Weekly downloads
 
Created
Source

Enqueue Work

A Node.js child process worker library for my London Node Meetup talk.

This is a proof of concept! Do not use this library in production.

Example Usage

'use strict';

const { createQueue } = require('enqueue-work');

const WORKER_SCRIPT = 'sorter.js'; // see test/sorter/index.js
const WORKER_COUNT = 4;

const queue = createQueue(WORKER_SCRIPT, WORKER_COUNT);
const { result } = await queue.schedule({ filename: 'numbers-large.json' });

Benchmarks

Array.prototype.sort

Uses a merge sort in V8 when n > 10, which has an average complexity of O(n log n).

Array.prototype.sort()

React Server-Side Rendering (SSR)

Please note that React 16 provides Node.js stream rendering, which will substantially reduce the time to first byte (TTFB) of your markup!

React SSR

Running locally

  • git clone https://github.com/jamesseanwright/enqueue-work.git
  • cd enqueue-work
  • nvm install/nvm use
  • npm i
  • npm run benchmark

Keywords

FAQs

Package last updated on 18 Oct 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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