Skip to Content
流畅的Python(第2版)
book

流畅的Python(第2版)

by Luciano Ramalho
April 2023
Intermediate to advanced
769 pages
25h 16m
Chinese
Posts & Telecom Press
Content preview from 流畅的Python(第2版)
Python
并发模型
567
Python
进阶:实际应用开发实战》(
Matthew Wilkes
著)是难得的一本好书,通过简短的
示例解释理论概念,还带领读者构建了一个具体应用程序,可在生产环境使用。这个程序
是一个数据聚合器,类似于
DevOps
监控系统或
IoT
分布式传感器的数据收集器
。这本书
中有两章涵盖
threading
asyncio
并发编程。
Parallel Programming with Python
Jan Palach
著)一书解读了并发和并行背后的核心概念,
涵盖
Python
标准库和
Celery
Using Asyncio in Python
Caleb
Hattingh
著)一书的第
2
章题为“
The Truth About Threads
(线程的真相)。
24
那一章谈论了线程的优缺点(引用了权威资料,令人信服),明确指出线
程的基本问题与
Python
GIL
没有任何关系
。以下内容摘自
Using Asyncio in Python
一书
的第
14
页。
我想强调的是:
使用线程的代码难以理解。
对于大规模并发操作(上千个并发任务),线程是一种低效模型。
如果你想自己探索(工作不能丢啊),了解线程和锁的理解难度,可以尝试
The Little Book
of Semaphores
Allen Downey
著)一书中的练习
。这本书中的练习,有的容易,有的非常
难,有的甚至无解;不过,即便是那些简单的题目也能让你大开眼界。
19.9.2
 
GIL
如果你对
GIL
感兴趣,请记住一点:我们在
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

Python高级编程(第2版)

Python高级编程(第2版)

Posts & Telecom Press, Michał Jaworski, Tarek Ziadé
Python贝叶斯分析(第2版)

Python贝叶斯分析(第2版)

Posts & Telecom Press, Osvaldo Martin
高效能PYTHON程式設計

高效能PYTHON程式設計

Micha Gorelick, Ian Ozsvald

Publisher Resources

ISBN: 9787115612366