SlideShare a Scribd company logo
Python3.6
Asynchronous
Programming
ASYNC / AWAIT
Clock is running out….
 The Count down
 Porting code
 Futurize
 Best practices
 Pep8 and Autopep8
 Flake8
 Code that runs on both 2 and 3
Import this
Concurrent Vs Parallel
 Stackoverflow answer here
 Coroutines are control structures that run your methods
 Coroutines are nice to each other
 Event loops takes care of scheduling the coroutines
 Event loop use Select/Poll to schedule coroutines that wait for IO
Asynchronous Programming
 What?
 Order or execution is not predetermined
 Why?
 More readable and self documenting code
 Efficient as order execution is determined at run time
 Coroutines + Asynchronous programming go well together
 Most real world problems do not need multiple threads (I will prove this one)
 How?
 Boost.asio for C and C++ developers
 Twisted, Gevent, Eventlet, Tornado for python 2.7
 Asyncio, Curio for Python 3.6 (Standard library)
 Goroutines for Go
 Promise for Javascript
Still think threads are good?
Python loves Asynchronous
programming
 Pep255 Simple generators
 Pep342 Enhanced generators, the rise of coroutines
 Pep380 Delegating to Subgenerator
 Pep492 Coroutines and Asynchronous context managers with async
/ await (We are here)
 Pep3148 Future objects
 Pep525 Asynchronous Generators
 Pep530 Asynchronous Comprehension

More Related Content

PDF
Async/Await Best Practices
PDF
Async/Await: TPL & Message Pumps
PDF
From zero to gremlin hero - Part I
PDF
Instrumenting Go (Gopherconindia Lightning talk by Bhasker Kode)
PPT
A Gomez T Tat Cesga
PPTX
Sync with async
PDF
Symfony 3 est sorti! Forum PHP 2015
ODP
Functional programming
Async/Await Best Practices
Async/Await: TPL & Message Pumps
From zero to gremlin hero - Part I
Instrumenting Go (Gopherconindia Lightning talk by Bhasker Kode)
A Gomez T Tat Cesga
Sync with async
Symfony 3 est sorti! Forum PHP 2015
Functional programming

What's hot (14)

PDF
Marconi: Queuing and Notification service for OpenStack
PDF
Does reporting takes lots of time
PDF
UNSW Australia Robocup Recap Hefei 2015
PDF
Two C++ Tools: Compiler Explorer and Cpp Insights
PPTX
Performance Profiling and Numeric Python
PDF
Seattle useR Group - R + Scala
PDF
grep.metacpan.org
PPTX
The Python outside of your textbook
PDF
Hacking the Python AST
PDF
Devoxx - France : Making Swift – 10 enseignements qu’on peut tirer des 31.463...
PDF
Kernel Recipes 2014 - kGraft: Live Patching of the Linux Kernel
PPTX
Python programming lab5
PPTX
Assembly Language Tutorials for Windows - 05 Procedures Part 1
PPTX
AMC Minor Technical Issues
Marconi: Queuing and Notification service for OpenStack
Does reporting takes lots of time
UNSW Australia Robocup Recap Hefei 2015
Two C++ Tools: Compiler Explorer and Cpp Insights
Performance Profiling and Numeric Python
Seattle useR Group - R + Scala
grep.metacpan.org
The Python outside of your textbook
Hacking the Python AST
Devoxx - France : Making Swift – 10 enseignements qu’on peut tirer des 31.463...
Kernel Recipes 2014 - kGraft: Live Patching of the Linux Kernel
Python programming lab5
Assembly Language Tutorials for Windows - 05 Procedures Part 1
AMC Minor Technical Issues
Ad

Similar to Python3.6 and asynchronous programming (20)

PPT
Packer Genetics: The selfish code
PPTX
Transactional Memory
PDF
Optimizing Python
PPT
Parallel Extentions to the .NET Framework
PPT
Overview Of Parallel Development - Ericnel
PPTX
Natural Laws of Software Performance
PDF
PyCon TW 2017 - PyPy's approach to construct domain-specific language runtime...
PDF
High Performance Python Practical Performant Programming for Humans 2nd Editi...
PDF
Streaming 101: Hello World
PPTX
[CB16] COFI break – Breaking exploits with Processor trace and Practical cont...
PPTX
Toub parallelism tour_oct2009
PDF
Elasticwulf Pycon Talk
PDF
Simplified Troubleshooting through API Scripting
PDF
Monitoring your Python with Prometheus (Python Ireland April 2015)
PPT
A Practical Event Driven Model
PPT
Prelim Slides
PPTX
Operating Systems
PPT
Poing: a coder’s take on protein modelling
PDF
.Net Multithreading and Parallelization
PPT
parellel computing
Packer Genetics: The selfish code
Transactional Memory
Optimizing Python
Parallel Extentions to the .NET Framework
Overview Of Parallel Development - Ericnel
Natural Laws of Software Performance
PyCon TW 2017 - PyPy's approach to construct domain-specific language runtime...
High Performance Python Practical Performant Programming for Humans 2nd Editi...
Streaming 101: Hello World
[CB16] COFI break – Breaking exploits with Processor trace and Practical cont...
Toub parallelism tour_oct2009
Elasticwulf Pycon Talk
Simplified Troubleshooting through API Scripting
Monitoring your Python with Prometheus (Python Ireland April 2015)
A Practical Event Driven Model
Prelim Slides
Operating Systems
Poing: a coder’s take on protein modelling
.Net Multithreading and Parallelization
parellel computing
Ad

Recently uploaded (20)

PPTX
CHAPTER 2 - PM Management and IT Context
PDF
Upgrade and Innovation Strategies for SAP ERP Customers
PDF
Digital Strategies for Manufacturing Companies
PDF
Understanding Forklifts - TECH EHS Solution
PDF
top salesforce developer skills in 2025.pdf
PDF
PTS Company Brochure 2025 (1).pdf.......
PPTX
Reimagine Home Health with the Power of Agentic AI​
PDF
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
PPTX
L1 - Introduction to python Backend.pptx
PDF
System and Network Administration Chapter 2
PDF
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
PPTX
Odoo POS Development Services by CandidRoot Solutions
PDF
Wondershare Filmora 15 Crack With Activation Key [2025
PDF
AI in Product Development-omnex systems
PDF
How to Choose the Right IT Partner for Your Business in Malaysia
PDF
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
PPTX
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
PDF
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
PDF
How Creative Agencies Leverage Project Management Software.pdf
PPTX
Transform Your Business with a Software ERP System
CHAPTER 2 - PM Management and IT Context
Upgrade and Innovation Strategies for SAP ERP Customers
Digital Strategies for Manufacturing Companies
Understanding Forklifts - TECH EHS Solution
top salesforce developer skills in 2025.pdf
PTS Company Brochure 2025 (1).pdf.......
Reimagine Home Health with the Power of Agentic AI​
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
L1 - Introduction to python Backend.pptx
System and Network Administration Chapter 2
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
Odoo POS Development Services by CandidRoot Solutions
Wondershare Filmora 15 Crack With Activation Key [2025
AI in Product Development-omnex systems
How to Choose the Right IT Partner for Your Business in Malaysia
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
How Creative Agencies Leverage Project Management Software.pdf
Transform Your Business with a Software ERP System

Python3.6 and asynchronous programming

  • 2. Clock is running out….  The Count down  Porting code  Futurize  Best practices  Pep8 and Autopep8  Flake8  Code that runs on both 2 and 3
  • 4. Concurrent Vs Parallel  Stackoverflow answer here  Coroutines are control structures that run your methods  Coroutines are nice to each other  Event loops takes care of scheduling the coroutines  Event loop use Select/Poll to schedule coroutines that wait for IO
  • 5. Asynchronous Programming  What?  Order or execution is not predetermined  Why?  More readable and self documenting code  Efficient as order execution is determined at run time  Coroutines + Asynchronous programming go well together  Most real world problems do not need multiple threads (I will prove this one)  How?  Boost.asio for C and C++ developers  Twisted, Gevent, Eventlet, Tornado for python 2.7  Asyncio, Curio for Python 3.6 (Standard library)  Goroutines for Go  Promise for Javascript
  • 7. Python loves Asynchronous programming  Pep255 Simple generators  Pep342 Enhanced generators, the rise of coroutines  Pep380 Delegating to Subgenerator  Pep492 Coroutines and Asynchronous context managers with async / await (We are here)  Pep3148 Future objects  Pep525 Asynchronous Generators  Pep530 Asynchronous Comprehension