Commit Graph

196 Commits

Author SHA1 Message Date
Carl Fredrik Samson
5fc2932899 Merge pull request #16 from WindSoilder/master
fix typo
2020-05-07 09:15:18 +02:00
WindSoilder
2d7d9f4680 fix typo 2020-05-07 09:04:16 +08:00
Carl Fredrik Samson
07aab4e76b Merge pull request #15 from WindSoilder/master
remove useless comment
2020-05-06 20:43:20 +02:00
WindSoilder
5da61651ba remove useless comment 2020-05-06 17:23:17 +08:00
Carl Fredrik Samson
0d669a8034 Merge pull request #14 from WindSoilder/master
make code compile, and fix typo
2020-05-06 08:58:14 +02:00
WindSoilder
41b28f466f make code compile, and fix typo 2020-05-06 09:11:03 +08: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
7db0aaa991 cleaned up and removed book directory for cleaner diffs 2020-04-18 02:31:57 +02:00
Carl Fredrik Samson
f4deaaf87b fix outdated links re: #13 2020-04-18 02:28:53 +02:00
Carl Fredrik Samson
a4c161c060 Merge pull request #12 from DarkEld3r/patch-1
Fix minor typo (som -> some)
2020-04-17 22:12:57 +02:00
Stanislav Tkach
66d706b9e5 Fix minor typo (som -> some) 2020-04-17 17:44:07 +03:00
Carl Fredrik Samson
8689ac98cc Merge pull request #11 from chengcyber/master
💄 panic button in mobile
2020-04-16 11:24:19 +02:00
Cheng
ad5bc20676 💄 panic button in mobile 2020-04-16 10:41:38 +08:00
Carl Fredrik Samson
a2f9535f3e fist sentence might be confusing, so I changed it 2020-04-14 23:56:59 +02:00
Carl Fredrik Samson
fbef19b079 more precise wording and fixed heap-pinning example which didn't work as expected 2020-04-14 23:51:54 +02:00
Carl Fredrik Samson
bd7e3c5572 added link to Chinese translation rec#issuecomment-613319223 + minor cleanup of code in Pin chapter 2020-04-14 23:05:54 +02:00
Carl Fredrik Samson
2fc79a9e03 added playground links to show problem using thread park/unpark 2020-04-14 00:37:03 +02:00
Carl Fredrik Samson
08b155698c Merge branch 'master' of https://github.com/cfsamson/books-futures-explained 2020-04-13 14:21:00 +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
Carl Fredrik Samson
d2bcca7aa6 Merge pull request #10 from ianthetechie/master
Fix minor typo
2020-04-12 10:14:40 +02:00
Ian Wagner
1520be032c Fix minor typo 2020-04-12 16:59:56 +09:00
Carl Fredrik Samson
6c38c20d16 Merge pull request #9 from eupn/patch-2
6_future_example.md: fix typo
2020-04-12 01:02:27 +02:00
Carl Fredrik Samson
3a31d08a9c Merge pull request #8 from eupn/patch-1
4_pin.md: fix typo
2020-04-12 01:01:50 +02:00
eupn
3757194684 6_future_example.md: fix typo 2020-04-12 01:52:17 +08:00
eupn
79a04ce025 4_pin.md: fix typo 2020-04-12 01:35:18 +08:00
Carl Fredrik Samson
f4b2029788 Merge pull request #7 from MarinPostma/typo-future
fix typo in code example
2020-04-11 00:28:49 +02:00
Carl Fredrik Samson
73363e0583 Merge branch 'master' into typo-future 2020-04-11 00:27:21 +02:00
Carl Fredrik Samson
02bb33c6b6 minor fixes to the debug printout of the main example 2020-04-11 00:23:39 +02:00
marin
9744403a6b fix typo in code example 2020-04-10 23:46:59 +02:00
Carl Fredrik Samson
8934c46679 fixed imports in futures example 2020-04-10 21:10:48 +02:00
Carl Fredrik Samson
4032c673e2 fixed error message thanks to #6 2020-04-10 20:53:15 +02:00
Carl Fredrik Samson
7d00580699 Merge branch 'olehmisar-plural-code' 2020-04-10 20:39:51 +02:00
Carl Fredrik Samson
dbf8395bc0 merged with latest changes and made some additional corrections 2020-04-10 20:39:35 +02:00
Carl Fredrik Samson
32bedb934c several improvements, see #2 for more details 2020-04-10 20:26:41 +02:00
Carl Fredrik Samson
08cda06ade Merge pull request #5 from olehmisar/patch-1
Minor fixes of verbs
2020-04-10 14:49:22 +02:00
Carl Fredrik Samson
39aecb264a Merge pull request #3 from Robert-Steiner/fix-minor-typos
Fixed minor typing errors
2020-04-09 22:08:02 +02:00
Robert Steiner
9f2578f334 Fixed minor typing errors 2020-04-09 19:31:22 +02:00
Carl Fredrik Samson
a90ff78349 some minor formatting updates 2020-04-09 00:43:25 +02:00
Carl Fredrik Samson
882ea1bc2a Merge pull request #1 from rkr35/master
Small spelling, grammar, and phrasing edits for Background Information
2020-04-09 00:12:02 +02:00
rkr35
9334463c06 Background Information: Add spelling and grammar changes 2020-04-08 16:35:19 -04:00
rkr35
f0a1d9a204 Introduction: Credits and thanks: Remove "and and" 2020-04-08 15:05:42 -04:00
olehmisar
8dfc2f8ed3 Put plural endings after grave accents 2020-04-08 13:53:35 +03:00
Oleh Misarosh
331bf7e4df Fix verb & clarify the sentence 2020-04-08 13:33:38 +03:00
Oleh Misarosh
0d5934e8b4 Fix the plural verb 2020-04-08 13:22:22 +03:00
Carl Fredrik Samson
a3ac3071df corrected futures 1.0 and 3.0 to 0.1 and 0.3 2020-04-07 21:15:14 +02:00
cfsamson
5947e07122 final audit pass 2020-04-07 11:55:33 +02:00
cfsamson
01181ce2a2 removed 1 line of code from greenthreads 2020-04-07 11:47:32 +02:00
cfsamson
f99523aaf5 final audit pass with minor changes 2020-04-07 11:13:17 +02:00
Carl Fredrik Samson
6e7a6bbc8d Update README.md 2020-04-07 01:52:46 +02:00
Carl Fredrik Samson
a840a1c3e2 linked to jons twitter 2020-04-06 22:34:58 +02:00