node js : there are two setInterval()

I'm Korean. My English skill too low.

In NODE.JS, there are two setInterval(). Of course, nodejs is single thread.

but, I worry about that each setInterval handles same value(or array).

To tell the truth, my circumstance has network and setInterval().

how can I controll the value. Or my worry is nothing?

You want to consider rewording this, I'm having trouble understanding what you are asking (especially in relation to network/threads), but I'm guessing you want to look into what the nodejs event loop is:

http://blog.mixu.net/2011/02/01/understanding-the-node-js-event-loop/

JavaScript runs code in what I like to call turns.

During a turn, the code that is running has full and exclusive access to all variables and the values bound to them. As no other code is or can be running, you don't have to worry about locking.

You can ignore the text below the line.


Note that although this doesn't matter in this case, if you have a process that completes over multiple turns, you should be aware that other code may have taken turns between those turns. Each turn is atomic, and there are ways to make multi-turn processes atomic but they are too complex to explain here.

Note that the concept of a turn comes from the E lang but fits so nicely in JavaScript.

only one thread is allocated to user-level user level 에서는 오직 1 thread 만 할당 되어있다 .

so, you don't have to worry about thread confliction. or IPC
즉 thread confliction 은 고민할 필요가 없다는 얘기

if your question is not regarding this , then you can handle every other case easily by your application-level programming 기타 상황은 응용프로그램 레벨에서 조치 하면 될것 같음.

i'm newbie to here, so i don't know whether language other than english is permitted or not ....