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

threads

Package Overview
Dependencies
Maintainers
1
Versions
73
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

threads - npm Package Compare versions

Comparing version 1.6.2 to 1.6.3

19

dist-esm/master/pool.js

@@ -220,6 +220,11 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {

}
const taskCompleted = () => this.taskCompletion(task.id);
let taskCompletionDotThen;
const taskID = this.nextTaskID++;
const taskCompletion = this.taskCompletion(taskID);
taskCompletion.catch((error) => {
// Prevent unhandled rejections here as we assume the user will use
// `pool.completed()`, `pool.settled()` or `task.catch()` to handle errors
this.debug(`Task #${taskID} errored:`, error);
});
const task = {
id: this.nextTaskID++,
id: taskID,
run: taskFunction,

@@ -235,9 +240,3 @@ cancel: () => {

},
get then() {
if (!taskCompletionDotThen) {
const promise = taskCompleted();
taskCompletionDotThen = promise.then.bind(promise);
}
return taskCompletionDotThen;
}
then: taskCompletion.then.bind(taskCompletion)
};

@@ -244,0 +243,0 @@ if (this.taskQueue.length >= maxQueuedJobs) {

@@ -227,6 +227,11 @@ "use strict";

}
const taskCompleted = () => this.taskCompletion(task.id);
let taskCompletionDotThen;
const taskID = this.nextTaskID++;
const taskCompletion = this.taskCompletion(taskID);
taskCompletion.catch((error) => {
// Prevent unhandled rejections here as we assume the user will use
// `pool.completed()`, `pool.settled()` or `task.catch()` to handle errors
this.debug(`Task #${taskID} errored:`, error);
});
const task = {
id: this.nextTaskID++,
id: taskID,
run: taskFunction,

@@ -242,9 +247,3 @@ cancel: () => {

},
get then() {
if (!taskCompletionDotThen) {
const promise = taskCompleted();
taskCompletionDotThen = promise.then.bind(promise);
}
return taskCompletionDotThen;
}
then: taskCompletion.then.bind(taskCompletion)
};

@@ -251,0 +250,0 @@ if (this.taskQueue.length >= maxQueuedJobs) {

{
"name": "threads",
"version": "1.6.2",
"version": "1.6.3",
"description": "Web workers & worker threads as simple as a function call",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

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