then = time.time()
for p in processes:
    if time_waited >= DURATION:
        p.join(0)
p.terminate()
p.join(DURATION - time_waited)
time_waited = time.time() - then
Join a group of python processes with a timeout