Skip to content

enriqueraso/Katas-AsyncProgrammingKata

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#AsyncProgramminKata This is an example of Asynchronous programming with async and await.

https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/concepts/async/

The example shows how to make a breakfast executing the following instructions asynchronously.

  1. Pour a cup of coffee.
  2. Heat up a pan, then fry two eggs.
  3. Fry three slices of bacon.
  4. Toast two pieces of bread.
  5. Add butter and jam to the toast.
  6. Pour a glass of orange juice.

In a synchronous programming we can obtain a result like this:

Pouring coffee
coffee is ready
Warming the egg pan...
cracking 2 eggs
cooking the eggs ...
Put eggs on plate
eggs are ready
putting 3 slices of bacon in the pan
cooking first side of bacon...
flipping a slice of bacon
flipping a slice of bacon
flipping a slice of bacon
cooking the second side of bacon...
Put bacon on plate
bacon is ready
Putting a slice of bread in the toaster
Putting a slice of bread in the toaster
Start toasting...
Remove toast from toaster
Putting butter on the toast
Putting jam on the toast
toast is ready
Pouring orange juice
oj is ready
Breakfast is ready!

In an asynchronous programming we can obtain a result like this:

Pouring coffee
coffee is ready
Warming the egg pan...
putting 3 slices of bacon in the pan
cooking first side of bacon...
Putting a slice of bread in the toaster
Putting a slice of bread in the toaster
Start toasting...
cracking 2 eggs
cooking the eggs ...
flipping a slice of bacon
flipping a slice of bacon
flipping a slice of bacon
cooking the second side of bacon...
Remove toast from toaster
Putting butter on the toast
Putting jam on the toast
toast is ready
Put bacon on plate
Put eggs on plate
bacon is ready
eggs are ready
Pouring orange juice
oj is ready
Breakfast is ready!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages