Threadpool code added for monitoring unsubmitted jobs with multiple threads