FAQ
There are many possible techniques for handling control flow in Nodejs. For
example, "async" module or chaining "promises" can be used to execute
dependent/independent asynchronous calls in serial or parallel. All
asynchronous calls are handled sequentially by the node's event loop, which
assigns their execution to a thread from internal thread pool maintained by
nodejs.
Can anyone explain how does the coordination between these threads happen
internally at system level?
Do they use shared queues for message passing or use semaphores to trigger
dependent asynchronous calls?

I would like to know the technical aspects of control flow in Nodejs.

--
--
Job Board: http://jobs.nodejs.org/
Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

---
You received this message because you are subscribed to the Google Groups "nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Search Discussions

  • Alex Kocharin at Nov 25, 2013 at 4:22 pm
    Coordination between these threads are actually very simple. There is no
    threads. Node.js is a single-threaded application, unless you're using
    cluster module, in which case it's still pretty much single-threaded as
    well.

    There is such thing called "thread pool", and it is maintained by libuv for
    IO only. However, it has nothing to do with javascript, and I don't know
    how it works because it never made any difference.

    My point is: "async" and "promises" work in just one single thread. Thread
    pool is another thing entirely, it's very low level, so it has nothing to
    do with control flow.

    Does it answer your question?

    On Monday, November 25, 2013 8:40:30 AM UTC+4, Swetha wrote:

    There are many possible techniques for handling control flow in Nodejs.
    For example, "async" module or chaining "promises" can be used to execute
    dependent/independent asynchronous calls in serial or parallel. All
    asynchronous calls are handled sequentially by the node's event loop, which
    assigns their execution to a thread from internal thread pool maintained by
    nodejs.
    Can anyone explain how does the coordination between these threads happen
    internally at system level?
    Do they use shared queues for message passing or use semaphores to trigger
    dependent asynchronous calls?

    I would like to know the technical aspects of control flow in Nodejs.
    --
    --
    Job Board: http://jobs.nodejs.org/
    Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
    You received this message because you are subscribed to the Google
    Groups "nodejs" group.
    To post to this group, send email to nodejs@googlegroups.com
    To unsubscribe from this group, send email to
    nodejs+unsubscribe@googlegroups.com
    For more options, visit this group at
    http://groups.google.com/group/nodejs?hl=en?hl=en

    ---
    You received this message because you are subscribed to the Google Groups "nodejs" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Floby at Nov 26, 2013 at 9:18 am
    Everything across the javascript frontier works with libuv
    http://nikhilm.github.io/uvbook/introduction.html
    On Monday, 25 November 2013 05:40:30 UTC+1, Swetha wrote:

    There are many possible techniques for handling control flow in Nodejs.
    For example, "async" module or chaining "promises" can be used to execute
    dependent/independent asynchronous calls in serial or parallel. All
    asynchronous calls are handled sequentially by the node's event loop, which
    assigns their execution to a thread from internal thread pool maintained by
    nodejs.
    Can anyone explain how does the coordination between these threads happen
    internally at system level?
    Do they use shared queues for message passing or use semaphores to trigger
    dependent asynchronous calls?

    I would like to know the technical aspects of control flow in Nodejs.
    --
    --
    Job Board: http://jobs.nodejs.org/
    Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
    You received this message because you are subscribed to the Google
    Groups "nodejs" group.
    To post to this group, send email to nodejs@googlegroups.com
    To unsubscribe from this group, send email to
    nodejs+unsubscribe@googlegroups.com
    For more options, visit this group at
    http://groups.google.com/group/nodejs?hl=en?hl=en

    ---
    You received this message because you are subscribed to the Google Groups "nodejs" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupnodejs @
categoriesnodejs
postedNov 25, '13 at 11:06a
activeNov 26, '13 at 9:18a
posts3
users3
websitenodejs.org
irc#node.js

3 users in discussion

Floby: 1 post Swetha: 1 post Alex Kocharin: 1 post

People

Translate

site design / logo © 2022 Grokbase