Security News
Supply Chain Attack Detected in Solana's web3.js Library
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
@ms-cloudpack/worker-pool
Advanced tools
Provides utilities for simplifying worker execution.
There are two source files when using workers - the worker entry, which hosts the code to be executed within the worker, and the host source, which instantiates the pool and executes the work.
First, let's set up the worker entry that will execute work inside the worker. Use initializeWorker
to set up your api surface:
workerEntry.ts
:
import { initializeWorker } from '@ms-cloudpack/worker-pool';
import { methodA, methodB } from './methods';
// Load any environmental side effects here.
// Then initialize the worker with the appropriate listeners and api dictionary.
initializeWorker({
beforeEach: () => {...}, // optional
afterEach: () => {...}, // optional
methods: {
methodA,
methodB,
},
});
In the host where we want to execute things to asynchronously run in the pool of workers:
import { WorkerPool } from '@ms-cloudpack/worker-pool';
const pool = new WorkerPool({ entry: './workerEntry.js' });
Work is executed from the pool created above:
const result = await pool.execute('methodA', [arg1, arg2, etc]);
FAQs
General worker pool helper.
The npm package @ms-cloudpack/worker-pool receives a total of 200 weekly downloads. As such, @ms-cloudpack/worker-pool popularity was classified as not popular.
We found that @ms-cloudpack/worker-pool demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.