logoalt Hacker News

austin-cheneytoday at 2:45 AM1 replyview on HN

This should be the expected behavior when multithreading. It is the expected behavior when executing a child process, such as node’s child_process.fork.


Replies

seniorsassycattoday at 3:48 AM

Fork, and normal worker threads always enter a script, there's clearly no shared lexical scope. This spawn method executes a function, but that fn can't interact with the scope outside

show 2 replies