I would like to use many ruby threads and call
Process.wait within them concurrently (on different processes created within each thread). However, given the “return” value of
Process.wait is a shared global value (
$?) this sounds like I could suffer race condition issues.
Am I right to be concerned? What’s my best way of avoiding this?
I would prefer to have individual threads waiting on single processes if possible, rather than simply launching them in parallel and doing a bulk wait.