Comments (8)
Yes. We (and the bson
copy we include) need to adopt nan: https://npmjs.org/package/nan
That involves re-copying-over https://github.com/mongodb/js-bson/tree/master/ext and adjusting src/*.cc
to use NAN APIs.
Volunteers very much appreciated!
from node-webworker-threads.
Is anyone working on nan integration? I tried my hand at it, but I'm not familiar enough with v8 to pull it off, I'm afraid. I'd really like to use this library on 0.11.x for one of the project I'm working on...
from node-webworker-threads.
Not at the moment — I'd like to use ethercalc with pm2 as well (pm2 only really works on Node 0.11.x), but I'd probably want to wait till 0.11.x stabilizes into 0.12.0 before tackling this issue.
One good news is that js-bson has adopted nan a couple months ago; perhaps you could help integrating their code here first?
from node-webworker-threads.
I submitted a pull request for integration of the latest js-bson.
from node-webworker-threads.
Awesome! Released as 0.4.12 on NPM.
from node-webworker-threads.
So, I got a build working with all of the nan stuff integrated into it. The code compiles and works properly on Node 0.10.27. The code compiles properly on Node 0.11.12 (both Windows and Linux), but I'm getting an error message back from V8.
# Fatal error in HandleScope::HandleScope
# Entering the V8 API without proper locking in place
I believe I traced the problem down to the aThread
function, specifically the following code:
if (useLocker) {
//printf("**** USING LOCKER: YES\n");
#if (NODE_MODULE_VERSION > 0x000B)
v8::Locker myLocker(thread->isolate);
#else
v8::Locker myLocker(thread->isolate);
#endif
//v8::Isolate::Scope isolate_scope(thread->isolate);
eventLoop(thread);
}
It seems that just using locker on the isolate like before isn't doing the trick for Node 0.11. Any help would be appreciated, as I'm not that familiar with v8. See the following link for the code:
from node-webworker-threads.
I tried to migrate the code to nan 1.1.0, then I got this problem: nodejs/nan#165.
After I fix that problem with some dirty code, I got this message after finishing test.ls:
FATAL ERROR: v8::HandleScope::CreateHandle() Cannot create a handle without a HandleScope
from node-webworker-threads.
I solved that problem by adding NanScope() to destroyThread().
from node-webworker-threads.
Related Issues (20)
- Can't install with yarn HOT 4
- Implement removeEventListener()
- importScripts() should resolve against webworker file not cwd HOT 1
- npm install fails with node 11 HOT 2
- corrupted double-linked list: webworker-threads/build/Release/WebWorkerThreads.node
- Terminating worker threads - the correct way ?
- thread Pool do not support to run a function with operation buffer? HOT 1
- npm install webworker-threads fails. node: 8.11.2, npm: 5.6.0. HOT 3
- How to debug webworkerthread.cc file HOT 1
- Error while installing webworker on ubuntu
- Accessing any unknown variable inside worker, program is not responding at all.
- npm install --global --production windows-build-tools HOT 1
- Issue installing on macOS HOT 6
- npm install error with node 12 HOT 3
- Build Failing HOT 1
- Can't install on macOS Catalina HOT 2
- Could not install on windows 10 HOT 1
- Failed to install [email protected] using npm HOT 11
- Can you provide a version support to node 10 +
- Can you provide a support for node 19 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 node-webworker-threads.