목록2024/01/02 (1)
hamlet-story
PYTHON - [개념] GIL (Global Interpreter Lock) 에 대해서 알아보자
들어가며 2023 기준 간단하게 Python 3.8 기준 내용을 조사한 내용에 대해서 정리 해볼려고 합니다. 따라서 혹여 잘못된 부분이 있을 경우 답글 남겨주시면 감사하겠습니다. 설명은 아래와 같이 이루어 집니다. 1. GIL (Global Interpreter Lock) 2. Thread-Safe 3. Mutex 4. Reference Counting GIL (Global Interpreter Lock) GIL (Global Interpreter Lock) 은 "파이썬(CPython) 인터프리터에 한개의 Thread가 하나의 ByteCode를 실행 할 수 있도록 걸어두는 Lock" 입니다. 먼저 이해를 위해 파이썬(CPython)의 Multi Thread 를 그림으로 확인해 보겠습니다. 보통..
Language/Python
2024. 1. 2. 07:00