Comments (1)
The data transferred between the main process and a worker must be plain JSON. Any class instance information is lost. If you want to transfer a class
instance, you'll need to put a serialization and deserialization logic of your own in place. If you want to transfer an error class, maybe you can let your function return an object { success, error }
instead of throwing an exception, in combination with logic to turn your data and error message into plain JSON.
from workerpool.
Related Issues (20)
- Task's error is being resolved HOT 3
- require is not defined on .exec function HOT 7
- Anyone able to get workerpool to work on Vite? HOT 21
- Create an ES module version of workerpool.js HOT 1
- TypeError: Cannot read properties of undefined (reading 'push') HOT 1
- Working with typescript causing an error: The worker script extension must be \".js\", \".mjs\", or \".cjs\". Received \".ts\" HOT 3
- Does workerpool support offload JavaScript between devices (e.g., from mobile to server workerpool) HOT 1
- Sharing streams with workers from the main thread HOT 5
- How to pass a callback function to "OnCreateWorker" method? HOT 1
- How to pass a callback function to `onCreateWorker` method? HOT 8
- Allow main thread to cleanly cancel workers HOT 4
- Add completed method in Pool HOT 5
- Using wokerpool on multi node.js processes running on the same server HOT 1
- support worker execArgv HOT 2
- Fix the code coverage script HOT 1
- App bundle fails to start worker, with message : "Worker is terminated" HOT 1
- Uncaught SyntaxError: Unexpected token '<' (at worker.ts:1:1) HOT 1
- Send event / message to running Worker? HOT 11
- Concurrent async tasks on a single worker HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from workerpool.