Commit Graph

184 Commits

Author SHA1 Message Date
Carl Fredrik Samson
351cd6c33e improved wording ch 3 2021-01-14 14:35:52 +01:00
Carl Fredrik Samson
df6c6f98d4 minor phrasing change 2020-12-30 00:48:40 +01:00
Carl Fredrik Samson
8dca87526b moved additional notes to ch 2 bonus section, credited ckaran, re #31 2020-12-30 00:41:13 +01:00
Cem Karan
064a9b8077 fix: Improved the explanation of Wakers.
The original explanation of Wakers sort-of implied that there was
exactly one Waker for all futures (each executor creates one, then
passes clones of that to all registered futures).  The new phrasing
makes it clear that isn't the case.  Also added another couple of
paragraphs to the conclusion to really expand on that.
2020-12-27 12:47:51 -05:00
Cem Karan
e1d7fa8d67 fix: There were two periods at the end of sentence.
The first period was inside of a bold section, and the second was
just outside of it. I kept the one on the inside.
2020-12-27 12:47:00 -05:00
Carl Fredrik Samson
3b11b49410 improved text in slide 11 2020-12-27 00:46:58 +01:00
Carl Fredrik Samson
a05cf73cd9 spellcheck slides and added a section about concurrenct 2020-12-26 11:44:38 +01:00
IKoshelev
fdaf5ee00b Update ch. 0, "Background information", JS sample
In JavaScript, fat arrow functions consisting of one expression (as opposed to a block of code body incased in '{' '}') don't need and can't have a `return` statement. Sample code being fixed was not valid JS: https://jsfiddle.net/dbzn1tcj/
2020-12-25 18:39:11 +01:00
Cem Karan
2a87978327 fix: Found and fixed some spelling errors. 2020-12-23 09:48:31 -05:00
booleancoercion
d551e74443 Fixed a typo (this time I think I didn't miss any) 2020-12-23 11:10:52 +02:00
booleancoercion
d31b7976d1 Caught another typo
For some reason my mind skipped this one the first time I went over it...
2020-12-23 10:49:27 +02:00
booleancoercion
ee276abbd3 Fixed a typo 2020-12-23 10:44:59 +02:00
Carl Fredrik Samson
aa0423caaf revised slides in chapter 3. Better descriptions, correction of errors and improved readibility on the small pictures in mdbook 2020-12-22 23:06:26 +01:00
Carl Fredrik Samson
b1e30646e6 fix slide 15 (wrong numbering) 2020-12-22 20:00:33 +01:00
Carl Fredrik Samson
e33b15af8b formulations, spelling and title chapter 3 2020-12-22 19:55:00 +01:00
Carl Fredrik Samson
b085fdd966 reworked chapter 2 and added new chapter 3 ref #25 2020-12-22 19:39:26 +01:00
Carl Fredrik Samson
b5ce4ff4c3 fixed spelling mistake in step 2 2020-12-22 14:44:25 +01:00
Carl Fredrik Samson
3a2d252468 fixed spelling mistake in slide 0 2020-12-22 14:31:36 +01:00
Carl Fredrik Samson
ef4be98f4f Merge branch 'master' of https://github.com/cfsamson/books-futures-explained into master 2020-12-22 14:25:31 +01:00
Carl Fredrik Samson
05437bc6b5 added new slides re #25 2020-12-22 14:21:41 +01:00
Constantine Solovev
f38bc31bd3 Update 1_futures_in_rust.md 2020-12-21 21:00:52 +04:00
Carl Fredrik Samson
a7ce98362a reworked chapter based on #25 2020-12-21 14:38:14 +01:00
YenForYang
3a1dca09fc Fix typo
A very minor typo under the Practical Rules for Pinning
2020-12-10 13:30:58 -06:00
Carl Fredrik Samson
94a194884a optin_builtin_traits is now called auto_traits 2020-12-06 01:49:29 +01:00
Carl Fredrik Samson
e4b84bdd83 Fixed error in green threads example. See: https://github.com/cfsamson/example-greenthreads/issues/20. Ugh... But it works now! 2020-12-06 01:34:53 +01:00
Carl Fredrik Samson
760fd57be3 Fixed naked function with arguments in green threads example. See https://github.com/cfsamson/example-greenthreads/issues/20 for more information. 2020-12-06 00:44:31 +01:00
Carl Fredrik Samson
3ba348601a prevent wake_by_ref from decreasing refcount. Fixes #22 2020-12-05 23:01:35 +01:00
Carl Fredrik Samson
8dfd7f445c updated links to fix #21 2020-12-05 22:11:41 +01:00
Carl Fredrik Samson
2128fc83d6 updated code comments re #20 2020-08-23 23:22:06 +02:00
oblique
527ec3835c waker context: Print size of Box<Box<SomeTrait>> 2020-08-09 22:10:13 +03:00
oblique
b0ca76b3d5 waker context: Fix size and align of raw vtable 2020-08-09 22:00:30 +03:00
David Teller
3ce63ffd13 Typo fix 2020-05-31 10:51:18 +02:00
Carl Fredrik Samson
467578773f changed the green threads example to use llvm_asm due to https://github.com/rust-lang/rust/pull/69171 2020-05-20 23:09:11 +02:00
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
James Robb
39169b737f Small conjugation correction. 2020-05-19 11:38:12 +00:00
James Robb
65401cbaf3 Small spelling and conjugation corrections. 2020-05-19 11:09:13 +00:00
James Robb
c7bb485b8a Small spelling and conjugation corrections. 2020-05-19 10:53:20 +00:00
James Robb
30b6e394c6 Small spelling corrections. 2020-05-19 10:37:38 +00:00
James Robb
6b41d2ff6d Mostly corrections to conjugation. 2020-05-19 10:28:27 +00:00
James Robb
ac5d80aa64 Oxford comma. 2020-05-19 10:11:53 +00:00
James Robb
18584400c7 Slightly awkward wording. 2020-05-19 10:08:21 +00:00
James Robb
92de09e917 Slightly awkward wording. 2020-05-19 10:06:23 +00:00
James Robb
aeb1c93449 Hyphen does not remove any ambiguity. 2020-05-19 10:03:47 +00:00
WindSoilder
2d7d9f4680 fix typo 2020-05-07 09:04:16 +08:00
WindSoilder
5da61651ba remove useless comment 2020-05-06 17:23:17 +08: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
f4deaaf87b fix outdated links re: #13 2020-04-18 02:28:53 +02:00
Stanislav Tkach
66d706b9e5 Fix minor typo (som -> some) 2020-04-17 17:44:07 +03:00
Cheng
ad5bc20676 💄 panic button in mobile 2020-04-16 10:41:38 +08:00