You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I just noticed that my program is busy-looping and thus using up a lot of CPU resources while waiting for a subprocess to finish. I'm using the Popen class. The root cause seems to be that waitpid() is used with the WNOHANG option in the util::wait_for_child_exit(int pid) function.
Why is WNOHANG being used? Is there a way to avoid busy-looping while waiting for a subprocess to finish?
The text was updated successfully, but these errors were encountered:
Hi,
I just noticed that my program is busy-looping and thus using up a lot of CPU resources while waiting for a subprocess to finish. I'm using the Popen class. The root cause seems to be that waitpid() is used with the WNOHANG option in the util::wait_for_child_exit(int pid) function.
Why is WNOHANG being used? Is there a way to avoid busy-looping while waiting for a subprocess to finish?
The text was updated successfully, but these errors were encountered: