This repository has been archived by the owner on Jun 13, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 337
FAQ
Daiyi Peng edited this page Aug 7, 2017
·
17 revisions
A: Here is a longer version. In short, Napa.js provides a multi-threaded JavaScript programming model that enables developers to write computation heavy code in JavaScript, without blocking Node event loop.
You should use it when:
- CPU bound logic that may block Node event loop
- Complex workflow that may involve parallel execution of JavaScript code
Q: I have Visual Studio 2015/2017 installed, why did npm install napajs
fail with following message: ""
A:
A: Yes and No. Napa.js support modules in the same way as Node.js does, but at present Napa.js doesn't support all Node.js built-in and core modules. If the module you want to use doesn't depend (directly or indirectly) on them, then you can use it, otherwise you cannot.
A: In JavaScript, each thread has its own heap, so you cannot access variable from different JavaScript thread. But, there are two ways you can communicate between JavaScript threads.