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.
Start your free trial

You might also like

Python高级编程(第2版)

Python高级编程(第2版)

Posts & Telecom Press, Michał Jaworski, Tarek Ziadé
Kafka权威指南(第2版)

Kafka权威指南(第2版)

Gwen Shapira, Todd Palino, Rajini Sivaram, Krit Petty
Python贝叶斯分析(第2版)

Python贝叶斯分析(第2版)

Posts & Telecom Press, Osvaldo Martin

Publisher Resources

ISBN: 9787115612366