I have a program that will do some machine learning predictions while at the same time monitors the computer resources that are being used (CPU, RAM, Disk I/O) using PSUtil module. I split them into two different programs; predict.py and monitor.py
The goal is when the predict.py starts, monitor.py starts. The monitor.py won't stop unless the predict.py has done working. I've done my research and found threading. However, when I had a try on that, it did not work. Is there any easy way to do this?