Please note that this version of the site is no longer being updated. All content has been merged with my IT Blog "Much Ado About IT". Click here to see this page on the other site. I've found that using Jekyll to be too fragile and complex. GitHub pages are too limited. The blog site was on WordPress (self-hosted) but that was too slow and clunky. The revamped blog now uses Hugo and is published using Netlify
How node.send() works
It is synchronous. See this discussion for details.
If you have code in a function node after a node.send()
, it will not run until all downstream connected nodes have finished processing their
sending routines. This is true of nodes further downstream as well.
Also see Issue 833 on GitHub
Another impact of this is that, because msg’s may be passed by reference to downstream nodes, a subsequent node may alter the msg. This means that any processing after a node.send(msg)
may be getting a msg object that has been altered.