From 5c10caf9c5d7ad26623a40620e9d1908d340d145 Mon Sep 17 00:00:00 2001 From: Carl Fredrik Samson Date: Wed, 1 Apr 2020 19:51:30 +0200 Subject: [PATCH 01/10] updated --- src/1_background_information.md | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/1_background_information.md b/src/1_background_information.md index 36d6aca..3546872 100644 --- a/src/1_background_information.md +++ b/src/1_background_information.md @@ -4,7 +4,7 @@ > > - High level introduction to concurrency in Rust > - Knowing what Rust provides and not when working with async code -> - Understanding why we need runtimes +> - Understanding why we need a runtime-library in Rust > - Getting pointers to further reading on concurrency in general Before we start implementing our `Futures` , we'll go through some background @@ -13,6 +13,18 @@ information that will help demystify some of the concepts we encounter. Actually, after going through these concepts, implementing futures will seem pretty simple. I promise. +## Popular alternatives for writing concurrent programs + +So let's kick this off by first taking a brief look into what the popular +options we have for writing concurrent programs + +### Callback based approcah + +You probably already know this from Javascript since it's extremely common: + + + + ## Futures So what is a future? From 7f7fe098f346b9ebf5fb9659952372d3b640bfae Mon Sep 17 00:00:00 2001 From: Carl Fredrik Samson Date: Wed, 1 Apr 2020 22:56:43 +0200 Subject: [PATCH 02/10] version3 start --- book/1_background_information.html | 8 +- book/1_why_futures.html | 629 +++++++++++++++++++++++++++++ book/2_waker_context.html | 2 +- book/3_generators_pin.html | 2 +- book/4_pin.html | 2 +- book/6_future_example.html | 2 +- book/8_finished_example.html | 2 +- book/conclusion.html | 2 +- book/index.html | 2 +- book/introduction.html | 6 +- book/print.html | 383 +++++++++++++++++- book/searchindex.js | 2 +- book/searchindex.json | 2 +- src/1_background_information.md | 12 - src/1_why_futures.md | 400 ++++++++++++++++++ src/SUMMARY.md | 1 + 16 files changed, 1427 insertions(+), 30 deletions(-) create mode 100644 book/1_why_futures.html create mode 100644 src/1_why_futures.md diff --git a/book/1_background_information.html b/book/1_background_information.html index e07de5b..5ff356e 100644 --- a/book/1_background_information.html +++ b/book/1_background_information.html @@ -78,7 +78,7 @@ @@ -155,7 +155,7 @@ @@ -279,7 +279,7 @@ it needs to be, so go on and read these chapters if you feel a bit unsure.