Timeout is not functioning in cases, where run() is called multiple times on a single instance of Sandbox. The example.js is one such case - if you just clone the repo and run the example, as suggested in the readme, the example #5 never finishes and the example keeps hanging.
I'm suggesting to fix this by attaching the timer directly to the child process. Therefore, the child process can be accessed from the Timeout callback function and terminated properly.
Timeout is not functioning in cases, where
run()
is called multiple times on a single instance of Sandbox. Theexample.js
is one such case - if you just clone the repo and run the example, as suggested in the readme, the example #5 never finishes and the example keeps hanging.I'm suggesting to fix this by attaching the timer directly to the child process. Therefore, the child process can be accessed from the Timeout callback function and terminated properly.