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

webworker-threads

Package Overview
Dependencies
Maintainers
1
Versions
45
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

webworker-threads - npm Package Compare versions

Comparing version 0.4.9 to 0.4.10

6

CHANGES.md

@@ -0,1 +1,7 @@

## 0.4.10
### Bug Fixes
* Fix `pool.any.emit`. (@craigwinstanley, Jason Winshell)
## 0.4.9

@@ -2,0 +8,0 @@

2

package.json
{
"name": "webworker-threads",
"version": "0.4.9",
"version": "0.4.10",
"main": "build/Release/WebWorkerThreads.node",

@@ -5,0 +5,0 @@ "description": "Lightweight Web Worker API implementation with native threads",

function createPool(n){
var T, pool, idleThreads, q, poolObject, e, RUN, EMIT;
var T, pool, idleThreads, q, poolObject, e;
T = this;

@@ -41,4 +41,2 @@ n = Math.floor(n);

return poolObject;
RUN = 1;
EMIT = 2;
function poolLoad(path, cb){

@@ -55,3 +53,3 @@ var i;

if (job) {
if (job.type === RUN) {
if (job.type === 1) {
t.eval(job.srcTextOrEventType, function(e, d){

@@ -61,11 +59,11 @@ var f;

f = job.cbOrData;
if (f) {
return job.cbOrData.call(t, e, d);
if (typeof f === 'function') {
return f.call(t, e, d);
} else {
return t.emit(job.srcTextOrEventType, f);
}
});
} else {
if (job.type === EMIT) {
t.emit(job.srcTextOrEventType, job.cbOrData);
nextJob(t);
}
} else if (job.type === 2) {
t.emit(job.srcTextOrEventType, job.cbOrData);
nextJob(t);
}

@@ -105,3 +103,3 @@ } else {

function evalAny(src, cb){
qPush(src, cb, RUN);
qPush(src, cb, 1);
if (idleThreads.length) {

@@ -119,3 +117,3 @@ nextJob(idleThreads.pop());

function emitAny(event, data){
qPush(event, data, EMIT);
qPush(event, data, 2);
if (idleThreads.length) {

@@ -122,0 +120,0 @@ nextJob(idleThreads.pop());

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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