Библиотека ansible плейбуков на разные случаи
25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

child_process.py 247 B

123456789101112
  1. import time
  2. import multiprocessing
  3. def test(info):
  4. while 1:
  5. print 'TEST', info[0], info[1]
  6. def run(proc_id):
  7. pool = multiprocessing.Pool(processes=4)
  8. pool.map(test, [(proc_id, i) for i in range(4)])
  9. pool.close()
  10. pool.join()