Skip to Content
For Enterprise
For Government
For Higher Ed
For Individuals
For Marketing
For Enterprise
For Government
For Higher Ed
For Individuals
For Marketing
Explore Skills
Cloud Computing
Microsoft Azure
Amazon Web Services (AWS)
Google Cloud
Cloud Migration
Cloud Deployment
Cloud Platforms
Data Engineering
Data Warehouse
SQL
Apache Spark
Microsoft SQL Server
MySQL
Kafka
Data Lake
Streaming & Messaging
NoSQL Databases
Relational Databases
Data Science
Pandas
R
MATLAB
SAS
D3
Power BI
Tableau
Statistics
Exploratory Data Analysis
Data Visualization
AI & ML
Generative AI
Machine Learning
Artificial Intelligence (AI)
Deep Learning
Reinforcement Learning
Natural Language Processing
TensorFlow
Scikit-Learn
Hyperparameter Tuning
MLOps
Programming Languages
Java
JavaScript
Spring
Python
Go
C#
C++
C
Swift
Rust
Functional Programming
Software Architecture
Object-Oriented
Distributed Systems
Domain-Driven Design
Architectural Patterns
IT/Ops
Kubernetes
Docker
GitHub
Terraform
Continuous Delivery
Continuous Integration
Database Administration
Computer Networking
Operating Systems
IT Certifications
Security
Network Security
Application Security
Incident Response
Zero Trust Model
Disaster Recovery
Penetration Testing / Ethical Hacking
Governance
Malware
Security Architecture
Security Engineering
Security Certifications
Design
Web Design
Graphic Design
Interaction Design
Film & Video
User Experience (UX)
Design Process
Design Tools
Business
Agile
Project Management
Product Management
Marketing
Human Resources
Finance
Team Management
Business Strategy
Digital Transformation
Organizational Leadership
Soft Skills
Professional Communication
Emotional Intelligence
Presentation Skills
Innovation
Critical Thinking
Public Speaking
Collaboration
Personal Productivity
Confidence / Motivation
Features
All features
Verifiable skills
AI Academy
Courses
Certifications
Interactive learning
Live events
Superstreams
Answers
Insights reporting
Radar Blog
Buy Courses
Plans
Sign In
Try Now
O'Reilly Platform
book
전문가를 위한 파이썬(2판)
by
루시아누 하말류
,
강권학
November 2024
Beginner to intermediate
1064 pages
25h 21m
Korean
Hanbit Media, Inc.
Content preview from
전문가를 위한 파이썬(2판)
886
4
부
제어 흐름
수 없는지 판단하는 데 어려움이 있을지 모르겠다. 답은 원칙적으로는 간단하다.
await
는 코루
틴과
asyncio.Task
인스턴스 등 대기형에 사용할 수 있다. 그러나 [예제
21
-
14
]에서 사용할
StreamWriter
클래스처럼 코루틴과 일반 함수를 무작위로 섞어서 사용하는 것처럼 보이는 일
부
API
는 까다롭다.
[예제
21
-
9
]로
flags
예제들에 관한 설명을 마친다. 이제 비동기 프로그래밍할 때 스레드나
프로세스 실행자를 사용하는 방법을 알아보자.
21
.
8
태스크를 실행자에 위임하기
비동기 프로그래밍할 때 파이썬보다
Node
.
js
가 우월한 부분은
Node
.
js
표준 라이브러리가 네
트워크
I
/
O
뿐만 아니라 모든
I
/
O
에 대해 비동기
API
를 제공한다는 점이다. 파이썬에서는 조
심하지 않으면 파일
I
/
O
가 비동기 애플리케이션의 성능을 상당히 떨어뜨릴 수 있다. 메인 스레
드에서 저장소를 읽거나 쓰면 이벤트 루프를 블록할 수 있기 때문이다.
[예제
21
-
6
]의
download_one(
)
코루틴에서 내려받은 이미지를 디스크에 저장하는 데 다음
코드를 사용했다.
await asyncio.to_thread(save_flag, image, f’{cc}.gif’)
앞에서도 이야기했지만,
asyncio.to_thread(
)
는 파이썬
3
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.
Start your free trial
You might also like
전문가를 위한 리액트
테자스 쿠마르
데이터로 전문가처럼 말하기
칼 올친
개발자를 위한 머신러닝&딥러닝
로런스 모로니
고성능 파이썬(2판)
오현석, 미샤 고렐릭, 이안 오스발트
Publisher Resources
ISBN: 9791169211772