doccaz / scc-tools

A set of simple tools to interact with SUSE Customer Center (SCC)
MIT License
12 stars 1 forks source link

Use ThreadPoolExecutor for better thread management #27

Closed doccaz closed 1 year ago

doccaz commented 2 years ago

After the 100% CPU usage problems, I'll port the code to use concurrent.futures.ThreadPoolExecutor.

References: https://docs.python.org/3/library/concurrent.futures.html https://stackoverflow.com/questions/6509261/how-to-use-concurrent-futures-with-timeouts

doccaz commented 1 year ago

It seems that after adopting a more "relaxed" approach to thread monitoring, everything is working fine and with lower CPU usage. Closing.