Linked Questions
26 questions linked to/from Nodejs Event Loop
1
vote
0
answers
153
views
How does event-loop occur in Nodejs? [duplicate]
Nodejs is known to be best for simplification by "single thread". As I know, this single thread handles requests through a event loop. I want to ask:
Is Nodejs really only have one thread only? For ...
0
votes
0
answers
89
views
Javascript event loop vs Node event loop [duplicate]
I am learning the basics of Node.js. One thing that constantly confuses me is the event loop. From what I have learned, Node.js handles asynchronous functions using threads in libuv. How does chrome ...
-1
votes
1
answer
67
views
where does nodejs event loop run? [duplicate]
https://medium.com/the-node-js-collection/what-you-should-know-to-really-understand-the-node-js-event-loop-and-its-metrics-c4907b19da4c
according to the above blog post,"There is only one thread that ...
25
votes
2
answers
8k
views
Confusion about node.js internal asynchronous I/O mechanism
I have learned that node.js use libeio internally to perform async file I/O, with thread pool, on *nix platform, am I right?
What about async network I/O? Is it done by libev? Is there also a ...
19
votes
3
answers
12k
views
What is the different between JavaScript Event loop and Node.js Event loop?
In JavaScript, the event loop is used in the engine. Here is one diagram to illustrate it from this article.
(source: mybalsamiq.com)
For Node.js, the event loop also implemented here. Quoting from ...
12
votes
3
answers
3k
views
When does Nodejs process quit?
A simple node program with a single line of code quits immediately after running all the code:
console.log('hello');
However, an http server program listening on a port does not quit after executing ...
8
votes
3
answers
5k
views
How is asynchronous callback implemented?
How do all the languages implements asynchronous callbacks?
For example in C++, one need to have a "monitor thread" to start a std::async. If it is started in main thread, it has to wait for the ...
7
votes
3
answers
1k
views
Explaining Node Callbacks and Single Threading
Is node's javascript environment single threaded, or does everything happen at the same time? Or (more likely) do neither of those statements explain what's going on with node.
I'm new to node and ...
3
votes
2
answers
2k
views
Nodejs multithreading vs nodejs single thread
I don't understand the difference in java multithread system and Nodejs mutltithread system in terms of peformance and resource sharing. As NodeJS use event loop single thread for your program but ...
4
votes
4
answers
1k
views
Are Node.js asynchronous tasks handled synchronously?
Consider the following piece of code:
var some_expensive_task = function(i) {
setTimeout(function() {
var a = 1;
while (a < 100000000) {
Math.sqrt(a);
...
4
votes
3
answers
555
views
Node.js event loop not making sense to me
I'm new to Node.js. I've been working my way through "Node.js the Right Way" by Jim R. Wilson and I'm running into a contradiction in the book (and in Node.js itself?) that I haven't been able to ...
1
vote
2
answers
1k
views
How does nodejs event loop keep running without a for/while forever loop?
I read Nodejs Event Loop and "Event Loop Explained" and Don't Block the Event Loop
I don't think there is a for/while forever loop in nodejs code (js or c++), e.g. as here explains libev ...
4
votes
1
answer
607
views
What is node.js event loop itself?
I have read a lot of guides and resources about event loop but I still do not know what is the event loop itself ?
I know it is implemented by libuv library but what is that thing which is ...
2
votes
2
answers
725
views
Using a blocking long sync operation will pause all users in Node.js?
If I have an SMTP server (like haraka) or a web server (like Express) that uses Node.js and I have to use a sync function that could not convert to be Async what would happen?
If I have to make an ...
9
votes
2
answers
447
views
What's the difference between setInterval(func) and setInterval(function(){func()})
My ex boss had a weird bug where when he used setInterval with a long delay interval:
setInterval(func, 3000000 /*50 minutes*/);
Node.js crashed.
func can be even a simple function that simply ...