funthreads
Advanced tools
Comparing version 1.1.0 to 1.1.1
{ | ||
"name": "funthreads", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"description": "A lightweight tool built on top of Node.js worker_threads, enabling multithreading.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -43,5 +43,2 @@ [](https://travis-ci.org/nairihar/funthreads) | ||
A comprehensive example can be found here: [_basic/index.js_](https://github.com/nairihar/funthreads/blob/master/examples/basic.js): | ||
## All examples: | ||
@@ -60,9 +57,10 @@ - [Basic example](https://github.com/nairihar/funthreads/tree/master/examples/basic.js) | ||
#### Parameters | ||
*Task (Function)*: The function to be executed in a thread. | ||
*...params (any)*: Additional arguments to be passed to the Task function. | ||
`- Task (Function)`: The function to be executed in a thread. | ||
`- ...params (any)`: Additional arguments to be passed to the Task function. | ||
The `executeInThread` function allows you to execute a given task function in a dedicated thread, similar to the behavior of `setTimeout` or `setInterval`. You provide the main function to be executed, along with any additional arguments (...args) that should be passed to the given function. | ||
#### Returns | ||
*Promise<any>*: A Promise that resolves with the return value of the callback. | ||
`Promise<any>`: A Promise that resolves with the return value of the callback. | ||
@@ -69,0 +67,0 @@ Inside the provided function, you have the flexibility to return any value, including a Promise. The returned value, whether it's a standard value or a Promise, will be passed back to you as the resolved result of the `Promise` returned by the `executeInThread` function. |
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
1
12560
96