Browse Source

๐Ÿ“ Update docs about async and response-model with more gender neutral language (#1869)

pull/3628/head
Edward Knight 4 years ago
committed by GitHub
parent
commit
daa0765653
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 12
      docs/en/docs/async.md
  2. 2
      docs/en/docs/tutorial/response-model.md

12
docs/en/docs/async.md

@ -102,13 +102,15 @@ To see the difference, imagine the following story about burgers:
### Concurrent Burgers
<!-- The gender neutral cook emoji "๐Ÿง‘โ€๐Ÿณ" does not render well in browsers. In the meantime, I'm using a mix of male "๐Ÿ‘จโ€๐Ÿณ" and female "๐Ÿ‘ฉโ€๐Ÿณ" cooks. -->
You go with your crush ๐Ÿ˜ to get fast food ๐Ÿ”, you stand in line while the cashier ๐Ÿ’ takes the orders from the people in front of you.
Then it's your turn, you place your order of 2 very fancy burgers ๐Ÿ” for your crush ๐Ÿ˜ and you.
You pay ๐Ÿ’ธ.
The cashier ๐Ÿ’ says something to the guy in the kitchen ๐Ÿ‘จโ€๐Ÿณ so he knows he has to prepare your burgers ๐Ÿ” (even though he is currently preparing the ones for the previous clients).
The cashier ๐Ÿ’ says something to the cook in the kitchen ๐Ÿ‘จโ€๐Ÿณ so they know they have to prepare your burgers ๐Ÿ” (even though they are currently preparing the ones for the previous clients).
The cashier ๐Ÿ’ gives you the number of your turn.
@ -146,9 +148,9 @@ Now let's imagine these aren't "Concurrent Burgers", but "Parallel Burgers".
You go with your crush ๐Ÿ˜ to get parallel fast food ๐Ÿ”.
You stand in line while several (let's say 8) cashiers that at the same time are cooks ๐Ÿ‘จโ€๐Ÿณ๐Ÿ‘จโ€๐Ÿณ๐Ÿ‘จโ€๐Ÿณ๐Ÿ‘จโ€๐Ÿณ๐Ÿ‘จโ€๐Ÿณ๐Ÿ‘จโ€๐Ÿณ๐Ÿ‘จโ€๐Ÿณ๐Ÿ‘จโ€๐Ÿณ take the orders from the people in front of you.
You stand in line while several (let's say 8) cashiers that at the same time are cooks ๐Ÿ‘ฉโ€๐Ÿณ๐Ÿ‘จโ€๐Ÿณ๐Ÿ‘ฉโ€๐Ÿณ๐Ÿ‘จโ€๐Ÿณ๐Ÿ‘ฉโ€๐Ÿณ๐Ÿ‘จโ€๐Ÿณ๐Ÿ‘ฉโ€๐Ÿณ๐Ÿ‘จโ€๐Ÿณ take the orders from the people in front of you.
Everyone before you is waiting ๐Ÿ•™ for their burgers ๐Ÿ” to be ready before leaving the counter because each of the 8 cashiers goes himself and prepares the burger right away before getting the next order.
Everyone before you is waiting ๐Ÿ•™ for their burgers ๐Ÿ” to be ready before leaving the counter because each of the 8 cashiers goes and prepares the burger right away before getting the next order.
Then it's finally your turn, you place your order of 2 very fancy burgers ๐Ÿ” for your crush ๐Ÿ˜ and you.
@ -174,7 +176,7 @@ There was not much talk or flirting as most of the time was spent waiting ๐Ÿ•™ i
In this scenario of the parallel burgers, you are a computer / program ๐Ÿค– with two processors (you and your crush ๐Ÿ˜), both waiting ๐Ÿ•™ and dedicating their attention โฏ to be "waiting on the counter" ๐Ÿ•™ for a long time.
The fast food store has 8 processors (cashiers/cooks) ๐Ÿ‘จโ€๐Ÿณ๐Ÿ‘จโ€๐Ÿณ๐Ÿ‘จโ€๐Ÿณ๐Ÿ‘จโ€๐Ÿณ๐Ÿ‘จโ€๐Ÿณ๐Ÿ‘จโ€๐Ÿณ๐Ÿ‘จโ€๐Ÿณ๐Ÿ‘จโ€๐Ÿณ. While the concurrent burgers store might have had only 2 (one cashier and one cook) ๐Ÿ’ ๐Ÿ‘จโ€๐Ÿณ.
The fast food store has 8 processors (cashiers/cooks) ๐Ÿ‘ฉโ€๐Ÿณ๐Ÿ‘จโ€๐Ÿณ๐Ÿ‘ฉโ€๐Ÿณ๐Ÿ‘จโ€๐Ÿณ๐Ÿ‘ฉโ€๐Ÿณ๐Ÿ‘จโ€๐Ÿณ๐Ÿ‘ฉโ€๐Ÿณ๐Ÿ‘จโ€๐Ÿณ. While the concurrent burgers store might have had only 2 (one cashier and one cook) ๐Ÿ’ ๐Ÿ‘จโ€๐Ÿณ.
But still, the final experience is not the best ๐Ÿ˜ž.
@ -236,7 +238,7 @@ You could have turns as in the burgers example, first the living room, then the
It would take the same amount of time to finish with or without turns (concurrency) and you would have done the same amount of work.
But in this case, if you could bring the 8 ex-cashier/cooks/now-cleaners ๐Ÿ‘จโ€๐Ÿณ๐Ÿ‘จโ€๐Ÿณ๐Ÿ‘จโ€๐Ÿณ๐Ÿ‘จโ€๐Ÿณ๐Ÿ‘จโ€๐Ÿณ๐Ÿ‘จโ€๐Ÿณ๐Ÿ‘จโ€๐Ÿณ๐Ÿ‘จโ€๐Ÿณ, and each one of them (plus you) could take a zone of the house to clean it, you could do all the work in **parallel**, with the extra help, and finish much sooner.
But in this case, if you could bring the 8 ex-cashier/cooks/now-cleaners ๐Ÿ‘ฉโ€๐Ÿณ๐Ÿ‘จโ€๐Ÿณ๐Ÿ‘ฉโ€๐Ÿณ๐Ÿ‘จโ€๐Ÿณ๐Ÿ‘ฉโ€๐Ÿณ๐Ÿ‘จโ€๐Ÿณ๐Ÿ‘ฉโ€๐Ÿณ๐Ÿ‘จโ€๐Ÿณ, and each one of them (plus you) could take a zone of the house to clean it, you could do all the work in **parallel**, with the extra help, and finish much sooner.
In this scenario, each one of the cleaners (including you) would be a processor, doing their part of the job.

2
docs/en/docs/tutorial/response-model.md

@ -47,7 +47,7 @@ And we are using this model to declare our input and the same model to declare o
Now, whenever a browser is creating a user with a password, the API will return the same password in the response.
In this case, it might not be a problem, because the user himself is sending the password.
In this case, it might not be a problem, because the user themself is sending the password.
But if we use the same model for another *path operation*, we could be sending our user's passwords to every client.

Loadingโ€ฆ
Cancel
Save