On Jun 29, 6:49 am, hd nguyen <[email protected]> wrote:
> Could you help me pointing out what I have done wrong here with my code?
> I'm new and not sure I handle event-driven mechanism in coding properly, I
> want each handler should process each request separately as normal threaded
> web app server (tomcat, IIS,...).

Your javascript code runs in a single threaded event loop. Network,
file, and other I/O are asynchronous, however the execution of your
code is still synchronous, it's only executing one line at a time. For
CPU-bound calculations, you can keep a pool of worker/child processes
that perform those types of calculations for you in the background, so
as not to block the event loop in your server process.

-- 
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 [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

Reply via email to