Python 3 Asynchronous Programming异步编程简单入门

从基本概念和底层原理带您入门Python 3异步编程
Free tutorial
Rating: 4.6 out of 5 (139 ratings)
6,387 students
37min of on-demand video
Simplified Chinese

了解异步编程的基本概念
关于并发,并行,同步,异步等基本概念
如何实现协程,事件驱动
asyncio的基本语法

Requirements

  • 已掌握Python3基本语法的python developer
  • 基本的进程线程thread,process概念

Description

python由于GIL(全局锁)的存在,不能发挥多核的优势,其性能一直饱受诟病。然而在IO密集型的网络编程里,异步处理比同步处理能提升成百上千倍的效率,弥补了python性能方面的短板,如最新的微服务框架japronto,resquests per second可达百万级。

 

python还有一个优势是库(第三方库)极为丰富,运用十分方便。asyncio是python3.4版本引入到标准库,python3.5又加入了async/await特性。

以下PEP是本课程的参考资料:

  • PEP 255 — Simple Generators

  • PEP 342 — Coroutines via Enhanced Generators

  • PEP 380 — Syntax for Delegating to a Subgenerator

  • PEP 492 — Coroutines with async and await syntax

  • PEP 525 — Asynchronous Generators

从这些 PEPs 中可以看出 Python 生成器 / 协程的发展历程:先是 PEP 255 引入了简单的生成器;接着 PEP 342 赋予了生成器 send() 方法,使其可以传递数据,协程也就有了实际意义;接下来,PEP 380 增加了 yield from 语法,简化了调用子生成器的语法;然后,PEP 492 将协程和生成器区分开,使得其更不易被用错;最后,PEP 525 提供了异步生成器,使得编写异步的数据产生器得到简化。


本课程就是从最基本的yield语法开始,让大家了解协程和异步背后实现的机理,然后再讲解asyncio的基本的语法,从而让大家对异步和asyncio有深入的理解。

Who this course is for:

  • 想了解python3异步编程Asynchronous Programming
  • 想了解asyncio的基本使用

Instructor

Senior Network DevOps Engineer 麦兜搞IT
Peng Xiao
  • 4.6 Instructor Rating
  • 5,400 Reviews
  • 39,683 Students
  • 20 Courses

Peng Xiao is a Network and Software DevOps Engineer.

He has more than 10 years experiences in IT/Network industry, worked for Cisco Systems, Nerdalize, KPN, ING in the past  12 years.

Peng is good at Python programming(more than 10 years experiences), Network technologies especially L3 routing protocols, distributed systems, database, etc. He also like open sourced technologies, and as a GitHub user  he joined some open sourced groups and made some contribution to them.

He is a scrum master and have a Cisco Service Provider CCIE certification.

He is working and living in the Netherlands now.

目前生活工作在荷兰, 是一名DevOps工程师。在IT相关领域有着超过10年的工作经验,先后在思科,Nerdalize,KPN,ING等公司工作过。

Google搜索 “麦兜搞IT”可以获取到更多关于我的信息。

我拥有CCIE(#39317)认证和Scrum Master认证。


欢迎关注我的youtube频道和Twitter,链接在头像下方图标按钮。

Top companies trust Udemy

Get your team access to Udemy's top 17,000+ courses