Commit Graph

9 Commits

Author SHA1 Message Date
James Robb
6e75083b0e Phrase correction. The phrase sounded strange, so I took a stab at what I think the author meant. 2020-05-19 11:38:53 +00:00
Carl Fredrik Samson
786faf4fd9 Removed the explicit call to close and mentioned a bug that can occur
when two tasks is given the same id.

The explicit close call is not needed. We can do that in the `Drop`
implementation instead. It's better to have accounting tasks like this
only one place and it didn't add anything to the example.

There is a subtle bug which occurs if two tasks are given the same Id.
I mentioned this explicitly since it's such an easy thing to do. I
added the fix as a reader excercise since for the examples sake I think
it's better to pass them in explicitly so that we don't "pollute" the
example with more code than strictly needed to get an understanding of
futures.
2020-04-27 00:02:41 +02:00
Carl Fredrik Samson
f4deaaf87b fix outdated links re: #13 2020-04-18 02:28:53 +02:00
Carl Fredrik Samson
d9eb756ef7 Added Bonus Section implementing a proper Parker
The problems addressed in the earlier version led to an "incorrect"
example which is bad to pass along after reading a whole book. after
getting some feedback in #2 i decided to show how we can create a
proper `Parker`.

The main example (which I assume most interested readers will copy) now
uses a proper parking thechnique so there should be no more dataraces
left.

I also removed the "Reader Excercise" paragraph suggesting that they
explore a way to implement proper parking since we now show that in
our main example.
2020-04-13 14:16:32 +02:00
cfsamson
0e57808ac6 audit pass conclusion 2020-04-06 17:01:34 +02:00
Carl Fredrik Samson
53529fa769 fixed some of the generator examples that were a bit unprecise 2020-02-05 22:41:14 +01:00
Carl Fredrik Samson
4af2fc03e6 added spawn chapter to main example 2020-02-04 01:31:02 +01:00
Carl Fredrik Samson
49fe0ad893 spellcheck intro + 3 first chapters 2020-02-02 18:54:28 +01:00
Carl Fredrik Samson
315cba6589 added missing link 2020-02-01 18:16:50 +01:00