Does node.native work with C++11 threads at all?

99 views
Skip to first unread message

doug livesey

unread,
Feb 21, 2012, 10:53:21 PM2/21/12
to noden...@googlegroups.com
Hi -- first of all, node.native looks *really* interesting, thankyou!
I was just wondering how it handles concurrency.
Is the idea that it's so fast that maybe concurrency isn't an issue, or is there support (or planned support) for threads in there, at all?
& again, thanks for this project -- I shall be following with great interest.
   Doug.

Daniel Kang

unread,
Feb 22, 2012, 2:43:47 PM2/22/12
to node.native
Hi, thanks for your interest.

Actually, both node.js and node.native are based on libuv (https://
github.com/joyent/libuv).
And, libuv is based upon other 'non-blocking asynchronous I/O'
libraries on different platforms.
Under the hood, these non-blocking things are also using threads
internally.
But, on top of these, end users are given an environment that
everything is event-driven and callbacks are deferred.
So, when you're working with node.js or node.native, you can just
simplify things as every code is executed in a single thread.
If you want to know more about the detail, please visit: http://nodejs.org/about/
Hope this help you.

- Daniel

doug livesey

unread,
Feb 22, 2012, 2:49:26 PM2/22/12
to noden...@googlegroups.com
That really does, thankyou.
Would there be any problem in creating my own threads from a node.native application?
& thanks again,
   Doug.

2012/2/22 Daniel Kang <m...@daniel.gs>

Daniel Kang

unread,
Feb 22, 2012, 2:55:43 PM2/22/12
to noden...@googlegroups.com
Maybe not, if you do so on your own risk. I don't have any plan for such APIs in node.native level. But, you can still create your own threads using system APIs.

FYI, node.js also support forking child processes and clustering features. And, I think node.native should support those too.

 - Daniel

2012/2/23 doug livesey <bio...@gmail.com>

doug livesey

unread,
Feb 22, 2012, 2:56:35 PM2/22/12
to noden...@googlegroups.com
Brilliant, thanks again.
I'm looking forwards to having a proper play with the project! :)
   Doug.
Reply all
Reply to author
Forward
0 new messages