I believe that is correct. Assuming that by instances you mean nodes.
Obviously if you use javascript timers within a function node then
other nodes are free to run whilst the node is waiting for the timer,
so you cannot assume a flow or global var will not change during that
time.
Colin
On 31 October 2017 at 13:59, iurly <gerlando...@gmail.com> wrote:
> Hi,
>
> I was under the impression that Node.JS executes javascript within a single
> thread.
> My understanding was therefore that it would be safe to write functions
> within function nodes which access global variables, with a guarantee that
> no two instances would be executing at the same time.
> Is my understanding wrong?
>
> Thank you!
>
> --
> http://nodered.org
>
> Join us on Slack to continue the conversation: http://nodered.org/slack
> ---
> You received this message because you are subscribed to the Google Groups
> "Node-RED" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to node-red+unsubscribe@googlegroups.com.
> To post to this group, send email to node...@googlegroups.com.
> Visit this group at https://groups.google.com/group/node-red.
> To view this discussion on the web, visit
> https://groups.google.com/d/msgid/node-red/92d58e02-9441-4f97-ae56-8a9962ae2126%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
--
http://nodered.org
Join us on Slack to continue the conversation: http://nodered.org/slack
---
You received this message because you are subscribed to the Google Groups "Node-RED" group.
To post to this group, send an email to node...@googlegroups.com.To unsubscribe from this group and stop receiving emails from it, send an email to node-red+unsubscribe@googlegroups.com.
Visit this group at https://groups.google.com/group/node-red.
To view this discussion on the web, visit https://groups.google.com/d/msgid/node-red/CAL%3D0gLuicqd6Hinom7jafOWDkkTDPB1vadU%2B2C8S25sNx1h4sA%40mail.gmail.com.
> Obviously if you use javascript timersadd to that, any asynchronous function call with its own callback.
You received this message because you are subscribed to a topic in the Google Groups "Node-RED" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/node-red/SFx6N8faJr8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to node-red+unsubscribe@googlegroups.com.
To post to this group, send email to node...@googlegroups.com.
Visit this group at https://groups.google.com/group/node-red.
To view this discussion on the web, visit https://groups.google.com/d/msgid/node-red/CAF%3DvhqdPYFAzpu2xipx5C-wuSeC3mNXY-VMgvR3idB%3DtwpBfyw%40mail.gmail.com.
Nick
> email to node-red+u...@googlegroups.com.
> To post to this group, send email to node...@googlegroups.com.
> Visit this group at https://groups.google.com/group/node-red.
> To view this discussion on the web, visit
> https://groups.google.com/d/msgid/node-red/92d58e02-9441-4f97-ae56-8a9962ae2126%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
--
http://nodered.org
Join us on Slack to continue the conversation: http://nodered.org/slack
---
You received this message because you are subscribed to the Google Groups "Node-RED" group.
To unsubscribe from this group and stop receiving emails from it, send an email to node-red+u...@googlegroups.com.
To post to this group, send an email to node...@googlegroups.com.
Visit this group at https://groups.google.com/group/node-red.
To view this discussion on the web, visit https://groups.google.com/d/msgid/node-red/CAL%3D0gLuicqd6Hinom7jafOWDkkTDPB1vadU%2B2C8S25sNx1h4sA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
--
http://nodered.org
Join us on Slack to continue the conversation: http://nodered.org/slack
---
You received this message because you are subscribed to a topic in the Google Groups "Node-RED" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/node-red/SFx6N8faJr8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to node-red+u...@googlegroups.com.
To unsubscribe from this group and all its topics, send an email to node-red+unsubscribe@googlegroups.com.
To post to this group, send email to node...@googlegroups.com.
Visit this group at https://groups.google.com/group/node-red.
To view this discussion on the web, visit https://groups.google.com/d/msgid/node-red/7f559e47-ec54-413f-9dc6-608d86d88439%40googlegroups.com.
To unsubscribe from this group and all its topics, send an email to node-red+u...@googlegroups.com.
To post to this group, send email to node...@googlegroups.com.
Visit this group at https://groups.google.com/group/node-red.