pnpnpn / timeout-decorator

Timeout decorator for Python
MIT License
628 stars 94 forks source link

Terminate and join all child processes #67

Closed mpeychev closed 2 years ago

mpeychev commented 3 years ago

When using multiprocessing to time the function, we need to eventually terminate the process even if the function succeeds. I believe it is also a good practice to join the process in the end.

This resolved an error I was running across, namely: OSError: [Errno 24] Too many open files.