On Thu, Mar 20, 2014 at 12:20 PM, Kevin Ingwersen
<[email protected]> wrote:
> I just want nodejs to run in a separate thread. Threads are not processes, I 
> am aware. But if I had a possibility to create an isolate that only worked in 
> that separate thread, would that work?
> I mean, you say that I can make an isolate depend on that other thread, 
> instead of the main one.
> To be honest, I dont know how thread-safe nodejs is, I just know that it 
> tries to be, by using Lockers and the like.

The Locker in src/node.cc is there to be nice to add-ons*.  As someone
who has maintained node.js for years, let me assure you that node.js
is not thread-safe at all.  (Okay, that's not actually assuring, is
it?  It's still true, though.)

The best you can achieve with the current code base is to call
node::Start() from another thread - once! - and pin it to that thread
for the lifetime of the process.  Anything else will blow up sooner or
later.

* node-fibers in particular, it needs a top-level Locker to work correctly.

-- 
-- 
v8-users mailing list
[email protected]
http://groups.google.com/group/v8-users
--- 
You received this message because you are subscribed to the Google Groups 
"v8-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to