Recently, I want to achieve a multi-thread task scheduler. More precisely, I have multiple machine learning jobs but only a few CPU cores. Thus, I want to write a scheduler