import multiprocessing import time def job(args): print("%s:%s" % args) time.wait(0.1) def main(): x = 0 while True: x += 1 pool = multiprocessing.Pool(processes=4) result = pool.map_async( job, ((x, y) for y in xrange(10)), chunksize=1, ) result.wait(timeout=999999) ### uncomment to fix #pool.close() #pool.join() if __name__ == '__main__': main()