# parallel-js/parallel.js

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/parallel-js-parallel-js).**

3,245 stars · 197 forks · JavaScript · MIT

## Links

- GitHub: https://github.com/parallel-js/parallel.js
- awesome-repositories: https://awesome-repositories.com/repository/parallel-js-parallel-js.md

## Topics

`javascript` `node` `parallel` `paralleljs` `webworker` `worker-threads`

## Description

Parallel.js is a JavaScript library for running computational tasks concurrently across background worker threads and multi-core environments in browsers and Node. It wraps web worker management into a framework that offloads heavy computations without blocking the main event loop.

The library initializes parallel jobs by wrapping serializable data in memory and configuring worker threads, execution timeouts, and synchronous fallback behavior. It supports mapping functions across datasets and reducing dataset values to scalar results by distributing work across separate threads. Operations execute asynchronously with customizable success and failure callbacks that trigger once chained parallel jobs complete.

Execution contexts can be customized by passing environment variables and global configuration data into worker threads. External functions and script files can also be injected into workers to ensure necessary code and dependencies are available during data processing.

## Tags

### Web Development

- [Parallel Worker Execution](https://awesome-repositories.com/f/web-development/asynchronous-module-loading/parallel-worker-execution.md) — Spawns background worker threads to execute custom functions against wrapped data asynchronously without blocking the main event loop. ([source](https://github.com/parallel-js/parallel.js/blob/master/README.md))
- [Shared Workers](https://awesome-repositories.com/f/web-development/background-processing-workers/persistent-background-workers/shared-workers.md) — Injects external functions or script files into worker threads so auxiliary code and dependencies are available during execution. ([source](https://github.com/parallel-js/parallel.js/blob/master/README.md))

### Part of an Awesome List

- [Datasets and Evaluation](https://awesome-repositories.com/f/awesome-lists/ai/datasets-and-evaluation.md) — Applies mapping functions and accumulation routines to dataset elements concurrently by distributing work across separate worker threads.

### Data & Databases

- [Concurrent Data Processing](https://awesome-repositories.com/f/data-databases/concurrent-data-processing.md) — Runs heavy computational jobs concurrently across multiple CPU cores or worker threads to accelerate dataset processing. ([source](https://github.com/parallel-js/parallel.js#readme))
- [Data Reducers](https://awesome-repositories.com/f/data-databases/data-reducers.md) — Combines elements of a dataset iteratively using a reducing function to produce a single aggregated result. ([source](https://github.com/parallel-js/parallel.js#readme))
- [Distributed Function Mapping](https://awesome-repositories.com/f/data-databases/distributed-function-mapping.md) — Applies a given function to every element in a dataset by distributing work across multiple parallel worker threads. ([source](https://github.com/parallel-js/parallel.js/blob/master/README.md))

### DevOps & Infrastructure

- [Job Behavior Configurations](https://awesome-repositories.com/f/devops-infrastructure/job-scheduling/job-behavior-configurations.md) — Initializes parallel jobs by wrapping serializable data in memory and configuring worker threads, timeouts, and fallback behavior. ([source](https://github.com/parallel-js/parallel.js/blob/master/README.md))

### Operating Systems & Systems Programming

- [Multi-Core Scaling](https://awesome-repositories.com/f/operating-systems-systems-programming/computer-architecture/instruction-execution-models/instruction-level-emulators/cpu-core-implementations/multi-core-scaling.md) — Runs heavy computational jobs concurrently across multiple CPU cores or worker threads to accelerate data processing in JavaScript.

### Programming Languages & Runtimes

- [Return Values](https://awesome-repositories.com/f/programming-languages-runtimes/block-value-returns/method-return-values/return-value-transformers/return-values.md) — Applies an accumulation function to members of a dataset to combine intermediate results and return a single scalar value. ([source](https://github.com/parallel-js/parallel.js/blob/master/README.md))
- [Web Worker Execution](https://awesome-repositories.com/f/programming-languages-runtimes/web-worker-execution.md) — Manages browser web worker threads to run custom functions against wrapped data asynchronously with optional execution timeouts.
- [Web Worker Parallelism](https://awesome-repositories.com/f/programming-languages-runtimes/web-worker-parallelism.md) — Offloads heavy computations to background worker threads or multi-core environments in Node and browsers as a JavaScript parallel processing library.

### Software Engineering & Architecture

- [Dataset Reshaping Operations](https://awesome-repositories.com/f/software-engineering-architecture/data-operation-pipelines/dataset-reshaping-operations.md) — Applies a given function to every element of a dataset concurrently by distributing work across separate worker threads. ([source](https://github.com/parallel-js/parallel.js#readme))
- [Error Handling](https://awesome-repositories.com/f/software-engineering-architecture/type-safe-data-handling/error-handling.md) — Registers callback functions to process successfully computed results or handle error objects when a parallel job finishes. ([source](https://github.com/parallel-js/parallel.js/blob/master/README.md))

### System Administration & Monitoring

- [Concurrency Utilities](https://awesome-repositories.com/f/system-administration-monitoring/concurrency-utilities.md) — Offers a framework for mapping and reducing datasets concurrently across multiple CPU cores or threads in JavaScript.

### Development Tools & Productivity

- [Task Completion Callbacks](https://awesome-repositories.com/f/development-tools-productivity/code-completion-tools/testing-environment-completion/task-completion-callbacks.md) — Executes customizable success and failure callback functions automatically once parallel computational jobs finish processing data. ([source](https://github.com/parallel-js/parallel.js#readme))
