동시 실행
*********

이 장에서 설명하는 모듈은 코드의 동시 실행을 지원합니다. 적절한 도구
선택은 실행할 작업(CPU 병목 대 IO 병목)과 선호하는 개발 스타일(이벤트
구동 협력적 다중작업 대 선점적 다중작업)에 따라 달라집니다. 다음은 개
요입니다:

* "threading" --- 스레드 기반 병렬 처리

  * Introduction

  * GIL and performance considerations

  * Reference

    * Thread-local data

    * Thread objects

    * Lock objects

    * RLock objects

    * Condition objects

    * Semaphore objects

    * "Semaphore" example

    * Event objects

    * Timer objects

    * Barrier objects

  * "with" 문으로 록, 조건 및 세마포어 사용하기

* "multiprocessing" --- Process-based parallelism

  * 소개

    * "Process" 클래스

    * 컨텍스트 및 시작 방법

    * 프로세스 간 객체 교환

    * 프로세스 간 동기화

    * 프로세스 간 상태 공유

    * 작업자 풀 사용

  * 레퍼런스

    * "Process"와 예외

    * 파이프와 큐

    * 잡동사니

    * Connection 객체

    * 동기화 프리미티브

    * 공유 "ctypes" 객체

      * "multiprocessing.sharedctypes" 모듈

    * 관리자

      * 사용자 정의 관리자

      * 원격 관리자 사용하기

    * 프락시 객체

      * 정리

    * 프로세스 풀

    * 리스너와 클라이언트

      * 주소 형식

    * 인증 키

    * 로깅

    * "multiprocessing.dummy" 모듈

  * 프로그래밍 지침

    * 모든 시작 방법

    * *spawn* 과 *forkserver* 시작 방법

  * 예제

* "multiprocessing.shared_memory" --- 프로세스 간 직접 액세스를 위한
  공유 메모리

* "concurrent" 패키지

* "concurrent.futures" --- 병렬 작업 실행하기

  * Executor 객체

  * ThreadPoolExecutor

    * ThreadPoolExecutor 예제

  * InterpreterPoolExecutor

  * ProcessPoolExecutor

    * ProcessPoolExecutor 예제

  * Future 객체

  * 모듈 함수

  * 예외 클래스

* "concurrent.interpreters" --- Multiple interpreters in the same
  process

  * Key details

  * Introduction

    * Multiple Interpreters and Isolation

    * Running in an Interpreter

    * Concurrency and Parallelism

    * Communication Between Interpreters

    * "Sharing" Objects

  * Reference

    * Interpreter objects

    * Exceptions

    * Communicating Between Interpreters

  * Basic usage

* "subprocess" --- 서브 프로세스 관리

  * "subprocess" 모듈 사용하기

    * 자주 사용되는 인자

    * Popen 생성자

    * 예외

  * 보안 고려 사항

  * Popen 객체

  * 윈도우 Popen 도우미

    * 윈도우 상수

  * 오래된 고수준 API

  * 이전 함수를 "subprocess" 모듈로 교체하기

    * **/bin/sh** 셸 명령 치환 교체하기

    * 셸 파이프라인 교체하기

    * "os.system()" 교체하기

    * "os.spawn" 패밀리 교체하기

    * Replacing "os.popen()"

  * 레거시 셸 호출 함수

  * 노트

    * Timeout Behavior

    * 윈도우에서 인자 시퀀스를 문자열로 변환하기

    * Disable use of "posix_spawn()"

* "sched" --- 이벤트 스케줄러

  * 스케줄러 객체

* "queue" --- 동기화된 큐 클래스

  * 큐 객체

    * Waiting for task completion

    * Terminating queues

  * SimpleQueue 객체

* "contextvars" --- 컨텍스트 변수

  * 컨텍스트 변수

  * 수동 컨텍스트 관리

  * asyncio 지원

다음은 위 서비스 중 일부에 대한 지원 모듈입니다:

* "_thread" --- 저수준 스레드 API
