사용자 도구

사이트 도구


python:parallel_processing

차이

문서의 선택한 두 판 사이의 차이를 보여줍니다.

차이 보기로 링크

양쪽 이전 판이전 판
다음 판
이전 판
python:parallel_processing [2017/09/06 22:52] rex8312python:parallel_processing [2024/03/23 02:42] (현재) – 바깥 편집 127.0.0.1
줄 3: 줄 3:
   * https://pythonhosted.org/joblib/   * https://pythonhosted.org/joblib/
   * https://medium.com/@bfortuner/python-multithreading-vs-multiprocessing-73072ce5600b   * https://medium.com/@bfortuner/python-multithreading-vs-multiprocessing-73072ce5600b
 +
 +AWS lambda
 +  * http://pywren.io/
 +
 +====== Multiprocessing ======
 +
 +자식 프로세스 다 죽이기
 +
 +<code python>
 +def killtree(pid, including_parent=True):
 +    parent = psutil.Process(pid)
 +    for child in parent.children(recursive=True):
 +        print "child", child
 +        child.kill()
 +
 +    if including_parent:
 +        parent.kill()
 +
 +## get the pid of this program
 +pid=os.getpid()
 +
 +## when you want to kill everything, including this program
 +killtree(pid)
 +</code>
 +
 +  * https://www.reddit.com/r/learnpython/comments/7vwyez/how_to_kill_child_processes_when_using/
python/parallel_processing.1504738325.txt.gz · 마지막으로 수정됨: (바깥 편집)