Skip to Content
고성능 파이썬(2판)
book

고성능 파이썬(2판)

by 오현석, 미샤 고렐릭, 이안 오스발트
May 2021
Beginner to intermediate
528 pages
11h 27m
Korean
Hanbit Media, Inc.
Content preview from 고성능 파이썬(2판)
297
8
비동기 I/O
I/O를 하지 않는 경우와 비교한 비율
CPU와 I/O 부하 처리 방법 비교
반복 한 번에 걸린 시간
일괄처리
비동기
I/O없음
그림
8-11
일괄처리 비동기
I
/
O
, 완전한 비동기
I
/
O
,
I
/
O
를 사용하지 않는 경우의 처리 시간 차이
8.4
마치며
실제 현장이나 프로덕션 시스템에서는 외부와 통신해야 할 때가 많다. 이런 외부의 대상은 다
른 서버의 데이터베이스, 다른 작업 컴퓨터, 처리할 데이터를 제공하는 데이터 서비스 등이다.
이때 여러분의 문제는 곧장
I
/
O
위주로 바뀌곤 한다. 즉 실행 시간 대부분이 입력/출력을 처리
하는 데 소요된다.
동시성을 사용하면 여러
I
/
O
연산 사이에 계산을 끼워 넣음으로써
I
/
O
위주의 문제를 해결할
수 있다. 동시성은
I
/
O
CPU
연산 사이의 근본적인 차이를 공략해 전체 실행 시간을 줄여
준다.
298
고성능 파이썬(2판)
앞서 살펴본 것처럼,
gevent
는 비동기
I
/
O
를 위한 가장 높은 수준의 인터페이스를 제공한
다. 반면
tornado
aiohttp
를 사용하면 비동기
I
/
O
스택을 직접 제어할 수 있다. 서로 다
른 수준의 추상화와 더불어, 각 라이브러리는 서로 다른 문법 패러다임을 사용한다. 하지만
asyncio
는 비동기 해법을 하나로 묶는 접착제이며, 이 모두를 제어할 수 있는 토대를 제공 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

이펙티브 타입스크립트

이펙티브 타입스크립트

Dan Vanderkam
견고한 데이터 엔지니어링

견고한 데이터 엔지니어링

조 라이스, 맷 하우슬리
핸즈온 비지도 학습

핸즈온 비지도 학습

강재원, 권재철, 안쿠르 A. 파텔

Publisher Resources

ISBN: 9791162244210