Skip to content

Commit 4df856d

Browse files
authored
Update README.md
1 parent 9fb4ddd commit 4df856d

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

README.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,13 @@ With a minified size of only 4.5kb, it has first class support for [Node.js](htt
1818

1919
Depending on the environment, it uses [Worker Threads](https://nodejs.org/api/worker_threads.html) or [Web Workers](https://developer.mozilla.org/en-US/docs/Web/API/Worker). In addition to [ES6 generators](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/function*) to make multithreading as simple as possible.
2020

21+
### The State of Multithreading in JavaScript
22+
23+
JavaScript's single-threaded nature means that tasks are executed one after the other, leading to potential performance bottlenecks and underutilized CPU resources. While Web Workers and Worker Threads offer a way to offload tasks to separate threads, managing the communication between these threads and their state is often complex and error-prone.
24+
25+
This project aims to solve these challenges by providing an intuitive Web Worker abstraction that mirrors the behavior of regular JavaScript functions.
26+
This way it feels like you're executing a regular function, but in reality, it's running in parallel on a separate threads.
27+
2128
## Installation
2229

2330
```bash
@@ -141,4 +148,4 @@ const fn = threaded(function* () {
141148

142149
// ...
143150
}
144-
```
151+
```

0 commit comments

Comments
 (0)