thread runner for python multiprocess