SlideShare a Scribd company logo
1 of 16
Download to read offline
Common `async` misconceptions
Saeb Amini
Senior Software Consultant @ Readify Telstra Purple
Blog: saebamini.com
@SaebAmini
@SaebAmini
.NET 1.1 (APM)
@SaebAmini
.NET 2.0 (EAP)
@SaebAmini
.NET 4.5 (TAP)
@SaebAmini
async == Multithreading
https://blogs.msdn.microsoft.com/ericlippert/2010/11/11/asynchrony-in-c-5-part-six-whither-async/
https://blog.stephencleary.com/2013/11/there-is-no-thread.html
https://weblogs.asp.net/dixin/understanding-c-sharp-async-await-1-compilation
@SaebAmini
async == Multithreading
https://blogs.msdn.microsoft.com/ericlippert/2010/11/11/asynchrony-in-c-5-part-six-whither-async/
https://blog.stephencleary.com/2013/11/there-is-no-thread.html
https://weblogs.asp.net/dixin/understanding-c-sharp-async-await-1-compilation
@SaebAmini
async == Multithreading
https://blogs.msdn.microsoft.com/ericlippert/2010/11/11/asynchrony-in-c-5-part-six-whither-async/
https://blog.stephencleary.com/2013/11/there-is-no-thread.html
https://weblogs.asp.net/dixin/understanding-c-sharp-async-await-1-compilation
@SaebAminihttp://www.ducons.com/blog/tests-and-thoughts-on-asynchronous-io-vs-multithreading
@SaebAmini
Can’t have concurrency with purely async code
https://docs.microsoft.com/en-us/windows/win32/fileio/i-o-completion-ports
@SaebAmini
Can’t have concurrency with purely async code
https://docs.microsoft.com/en-us/windows/win32/fileio/i-o-completion-ports
@SaebAmini
You need to use async/await in the whole call stack
@SaebAmini
You need to use async/await in the whole call stack
@SaebAmini
Summary
• Async doesn’t need multi-threading
• You can still have concurrency without threads via IOCP
• Async is great, but use it where it makes sense
• You don’t always need async/await and its state machines
@SaebAmini
Want to go deeper into the rabbit hole?
• https://blog.stephencleary.com/
• The Zen of async Best practices for best performance https://youtu.be/zjLWWz2YnyQ
• Stephen Toub’s blog: https://devblogs.microsoft.com/pfxteam/
• https://saebamini.com/common-async-and-await-misconceptions/
• https://docs.microsoft.com/en-us/windows/win32/fileio/i-o-completion-ports
• https://blogs.msdn.microsoft.com/ericlippert/2010/11/11/asynchrony-in-c-5-part-six-
whither-async/
• https://weblogs.asp.net/dixin/understanding-c-sharp-async-await-1-compilation
Please thank our sponsors
Please give us feedback
To go into the draw for prizes, please
remember to complete your feedback at:
https://www.dddbrisbane.com/feedback
No feedback = No Prizes!

More Related Content

What's hot

How I did create Telegram bot - Roman Senin
How I did create Telegram bot - Roman SeninHow I did create Telegram bot - Roman Senin
How I did create Telegram bot - Roman SeninElixir Club
 
Upgrading to php 5.6
Upgrading to php 5.6Upgrading to php 5.6
Upgrading to php 5.6Luka Skupnjak
 
Building CI/CD Pipelines for MongoDB Realm Apps
Building CI/CD Pipelines for MongoDB Realm AppsBuilding CI/CD Pipelines for MongoDB Realm Apps
Building CI/CD Pipelines for MongoDB Realm AppsLauren Hayward Schaefer
 
Unikernels and another way of secure cloud computing
Unikernels and another way of secure cloud computingUnikernels and another way of secure cloud computing
Unikernels and another way of secure cloud computingMotiejus Jakštys
 
Zachary Kessin - Deploying and Upgrading with Zero Downtime in Elixir - Codem...
Zachary Kessin - Deploying and Upgrading with Zero Downtime in Elixir - Codem...Zachary Kessin - Deploying and Upgrading with Zero Downtime in Elixir - Codem...
Zachary Kessin - Deploying and Upgrading with Zero Downtime in Elixir - Codem...Codemotion
 
Xamarin Dev Days - Introduction to Xamarin.Forms, Insights, Test Cloud
Xamarin Dev Days -  Introduction to Xamarin.Forms, Insights, Test CloudXamarin Dev Days -  Introduction to Xamarin.Forms, Insights, Test Cloud
Xamarin Dev Days - Introduction to Xamarin.Forms, Insights, Test CloudJames Montemagno
 
Postman Webinar: "From APIs to Serverless Cloud Applications in Minutes"
Postman Webinar: "From APIs to Serverless Cloud Applications in Minutes"Postman Webinar: "From APIs to Serverless Cloud Applications in Minutes"
Postman Webinar: "From APIs to Serverless Cloud Applications in Minutes"Postman
 
Native iphone app test automation with appium
Native iphone app test automation with appiumNative iphone app test automation with appium
Native iphone app test automation with appiumJames Eisenhauer
 
Infinum - Building API based apps without an API
Infinum - Building API based apps without an APIInfinum - Building API based apps without an API
Infinum - Building API based apps without an APIInfinum
 
Monitoring As Code: How to Integrate App Monitoring Into Your Developer Cycle
Monitoring As Code: How to Integrate App Monitoring Into Your Developer CycleMonitoring As Code: How to Integrate App Monitoring Into Your Developer Cycle
Monitoring As Code: How to Integrate App Monitoring Into Your Developer CycleAtlassian
 
Zürich selenium meetup mobile and web automation under one umbrella
Zürich selenium meetup mobile and web automation under one umbrellaZürich selenium meetup mobile and web automation under one umbrella
Zürich selenium meetup mobile and web automation under one umbrellaMichael Palotas
 
Application Performance Monitoring for WordPress
Application Performance Monitoring for WordPressApplication Performance Monitoring for WordPress
Application Performance Monitoring for WordPressWP Engine
 

What's hot (13)

How I did create Telegram bot - Roman Senin
How I did create Telegram bot - Roman SeninHow I did create Telegram bot - Roman Senin
How I did create Telegram bot - Roman Senin
 
Upgrading to php 5.6
Upgrading to php 5.6Upgrading to php 5.6
Upgrading to php 5.6
 
Building CI/CD Pipelines for MongoDB Realm Apps
Building CI/CD Pipelines for MongoDB Realm AppsBuilding CI/CD Pipelines for MongoDB Realm Apps
Building CI/CD Pipelines for MongoDB Realm Apps
 
Unikernels and another way of secure cloud computing
Unikernels and another way of secure cloud computingUnikernels and another way of secure cloud computing
Unikernels and another way of secure cloud computing
 
Zachary Kessin - Deploying and Upgrading with Zero Downtime in Elixir - Codem...
Zachary Kessin - Deploying and Upgrading with Zero Downtime in Elixir - Codem...Zachary Kessin - Deploying and Upgrading with Zero Downtime in Elixir - Codem...
Zachary Kessin - Deploying and Upgrading with Zero Downtime in Elixir - Codem...
 
Xamarin Dev Days - Introduction to Xamarin.Forms, Insights, Test Cloud
Xamarin Dev Days -  Introduction to Xamarin.Forms, Insights, Test CloudXamarin Dev Days -  Introduction to Xamarin.Forms, Insights, Test Cloud
Xamarin Dev Days - Introduction to Xamarin.Forms, Insights, Test Cloud
 
Postman Webinar: "From APIs to Serverless Cloud Applications in Minutes"
Postman Webinar: "From APIs to Serverless Cloud Applications in Minutes"Postman Webinar: "From APIs to Serverless Cloud Applications in Minutes"
Postman Webinar: "From APIs to Serverless Cloud Applications in Minutes"
 
Native iphone app test automation with appium
Native iphone app test automation with appiumNative iphone app test automation with appium
Native iphone app test automation with appium
 
DevOps + MongoDB Serverless = 
DevOps + MongoDB Serverless = DevOps + MongoDB Serverless = 
DevOps + MongoDB Serverless = 
 
Infinum - Building API based apps without an API
Infinum - Building API based apps without an APIInfinum - Building API based apps without an API
Infinum - Building API based apps without an API
 
Monitoring As Code: How to Integrate App Monitoring Into Your Developer Cycle
Monitoring As Code: How to Integrate App Monitoring Into Your Developer CycleMonitoring As Code: How to Integrate App Monitoring Into Your Developer Cycle
Monitoring As Code: How to Integrate App Monitoring Into Your Developer Cycle
 
Zürich selenium meetup mobile and web automation under one umbrella
Zürich selenium meetup mobile and web automation under one umbrellaZürich selenium meetup mobile and web automation under one umbrella
Zürich selenium meetup mobile and web automation under one umbrella
 
Application Performance Monitoring for WordPress
Application Performance Monitoring for WordPressApplication Performance Monitoring for WordPress
Application Performance Monitoring for WordPress
 

Similar to Common async misconceptions

WebDev References
WebDev ReferencesWebDev References
WebDev Referencesdynamis
 
Heybe Pentest Automation Toolkit - BlackHat USA 2015
Heybe Pentest Automation Toolkit - BlackHat USA 2015Heybe Pentest Automation Toolkit - BlackHat USA 2015
Heybe Pentest Automation Toolkit - BlackHat USA 2015Bahtiyar Bircan
 
Build Database Applications for SharePoint!
Build Database Applications for SharePoint!Build Database Applications for SharePoint!
Build Database Applications for SharePoint!Iron Speed
 
Build Database Applications for SharePoint
Build Database Applications for SharePointBuild Database Applications for SharePoint
Build Database Applications for SharePointIron Speed
 
Don't worry be API with Slim framework and Joomla
Don't worry be API with Slim framework and JoomlaDon't worry be API with Slim framework and Joomla
Don't worry be API with Slim framework and JoomlaPierre-André Vullioud
 
Automatisation in development and testing - within budget
Automatisation in development and testing - within budgetAutomatisation in development and testing - within budget
Automatisation in development and testing - within budgetDavid Lukac
 
Frontend development of the (current) future
Frontend development of the (current) futureFrontend development of the (current) future
Frontend development of the (current) futureFilip Bruun Bech-Larsen
 
Continuous integration php
Continuous integration phpContinuous integration php
Continuous integration phpLai Hieu
 
Php day 20 11 e xo continuousintegration php
Php day 20 11 e xo continuousintegration phpPhp day 20 11 e xo continuousintegration php
Php day 20 11 e xo continuousintegration phpQuang Anh Le
 
NDC 2011 - Let me introduce my Moncai
NDC 2011 - Let me introduce my MoncaiNDC 2011 - Let me introduce my Moncai
NDC 2011 - Let me introduce my Moncaimoncai
 
FAKE (F# Make) & Automation
FAKE (F# Make) & AutomationFAKE (F# Make) & Automation
FAKE (F# Make) & AutomationSergey Tihon
 
Windows automation with ansible
Windows automation with ansibleWindows automation with ansible
Windows automation with ansibleSwapnil Dahiphale
 
Velocity London - Chaos Engineering Bootcamp
Velocity London - Chaos Engineering Bootcamp Velocity London - Chaos Engineering Bootcamp
Velocity London - Chaos Engineering Bootcamp Ana Medina
 
All the Laravel things: up and running to making $$
All the Laravel things: up and running to making $$All the Laravel things: up and running to making $$
All the Laravel things: up and running to making $$Joe Ferguson
 

Similar to Common async misconceptions (20)

WebDev References
WebDev ReferencesWebDev References
WebDev References
 
Heybe Pentest Automation Toolkit - BlackHat USA 2015
Heybe Pentest Automation Toolkit - BlackHat USA 2015Heybe Pentest Automation Toolkit - BlackHat USA 2015
Heybe Pentest Automation Toolkit - BlackHat USA 2015
 
Designing & Building Secure Web APIs
Designing & Building Secure Web APIsDesigning & Building Secure Web APIs
Designing & Building Secure Web APIs
 
Build Database Applications for SharePoint!
Build Database Applications for SharePoint!Build Database Applications for SharePoint!
Build Database Applications for SharePoint!
 
Build Database Applications for SharePoint
Build Database Applications for SharePointBuild Database Applications for SharePoint
Build Database Applications for SharePoint
 
Don't worry be API with Slim framework and Joomla
Don't worry be API with Slim framework and JoomlaDon't worry be API with Slim framework and Joomla
Don't worry be API with Slim framework and Joomla
 
Automatisation in development and testing - within budget
Automatisation in development and testing - within budgetAutomatisation in development and testing - within budget
Automatisation in development and testing - within budget
 
Frontend development of the (current) future
Frontend development of the (current) futureFrontend development of the (current) future
Frontend development of the (current) future
 
Continuous integration php
Continuous integration phpContinuous integration php
Continuous integration php
 
Php day 20 11 e xo continuousintegration php
Php day 20 11 e xo continuousintegration phpPhp day 20 11 e xo continuousintegration php
Php day 20 11 e xo continuousintegration php
 
NDC 2011 - Let me introduce my Moncai
NDC 2011 - Let me introduce my MoncaiNDC 2011 - Let me introduce my Moncai
NDC 2011 - Let me introduce my Moncai
 
HTML5: o que vem aí...
HTML5: o que vem aí...HTML5: o que vem aí...
HTML5: o que vem aí...
 
FAKE (F# Make) & Automation
FAKE (F# Make) & AutomationFAKE (F# Make) & Automation
FAKE (F# Make) & Automation
 
ALM in 2010
ALM in 2010ALM in 2010
ALM in 2010
 
Windows automation with ansible
Windows automation with ansibleWindows automation with ansible
Windows automation with ansible
 
Cqcon2015
Cqcon2015Cqcon2015
Cqcon2015
 
Velocity London - Chaos Engineering Bootcamp
Velocity London - Chaos Engineering Bootcamp Velocity London - Chaos Engineering Bootcamp
Velocity London - Chaos Engineering Bootcamp
 
All the Laravel things: up and running to making $$
All the Laravel things: up and running to making $$All the Laravel things: up and running to making $$
All the Laravel things: up and running to making $$
 
Origins of Serverless
Origins of ServerlessOrigins of Serverless
Origins of Serverless
 
The Future of the web
The Future of the webThe Future of the web
The Future of the web
 

Recently uploaded

How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfhans926745
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdfChristopherTHyatt
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 

Recently uploaded (20)

How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 

Common async misconceptions