본문 바로가기
운영체제

python에서의 멀티 스레드, 멀티 프로세스

by meanjung 2022. 3. 2.

파이썬에서는 멀티 스레드로 동작하거나, 하나의 스레드로 동작하거나 별 차이가 없다. 

그 이유는 파이썬의 GIL(Global Interpreter Lock) 때문이다. 

때문에 multiprocessing 모듈을 사용해 멀티 프로세스로 구현하면 더 효율적으로 코드를 짤 수 있다.

 

https://monkey3199.github.io/develop/python/2018/12/04/python-pararrel.html

 

Nathan's Blog

The blog to learn more.

monkey3199.github.io

 

'운영체제' 카테고리의 다른 글

파이프(Pipe)  (0) 2022.02.11
install pip for python2.7 in ubuntu20.04(feat. pwntools)  (0) 2022.02.04
ubuntu20.04 wine 설치  (0) 2022.01.15
ubuntu 15.04 apt-get update error 해결  (0) 2021.11.24
pseudo terminal(import pty)  (0) 2021.09.05

댓글