You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/en/docs/async.md
+7-7Lines changed: 7 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -63,13 +63,13 @@ Let's see that phrase by parts in the sections below, below:
63
63
64
64
## Asynchronous Code
65
65
66
-
Asynchronous code just means that the language has a way to tell the computer / program that at some point in the code, he will have to wait for *something else* to finish somewhere else. Let's say that *something else* is called "slow-file".
66
+
Asynchronous code just means that the language 💬 has a way to tell the computer / program 🤖 that at some point in the code, it 🤖 will have to wait for *something else* to finish somewhere else. Let's say that *something else* is called "slow-file" 📝.
67
67
68
-
So, during that time, the computer can go and do some other work, while "slow-file" finishes.
68
+
So, during that time, the computer can go and do some other work, while "slow-file" 📝 finishes.
69
69
70
-
Then the computer / program will come back every time it has a chance because it's waiting again, or whenever he finished all the work he had at that point. And it will see if any of the tasks he was waiting for has already finished doing whatever it had to do.
70
+
Then the computer / program 🤖 will come back every time it has a chance because it's waiting again, or whenever it 🤖 finished all the work it had at that point. And it 🤖 will see if any of the tasks it was waiting for have already finished, doing whatever it had to do.
71
71
72
-
And then it takes the first task to finish (let's say, our "slow-file") and continues whatever it had to do with it.
72
+
Next, it 🤖 takes the first task to finish (let's say, our "slow-file" 📝) and continues whatever it had to do with it.
73
73
74
74
That "wait for something else" normally refers to <abbrtitle="Input and Output">I/O</abbr> operations that are relatively "slow" (compared to the speed of the processor and the RAM memory), like waiting for:
75
75
@@ -82,7 +82,7 @@ That "wait for something else" normally refers to <abbr title="Input and Output"
82
82
* a database query to return the results
83
83
* etc.
84
84
85
-
As the execution time is consumed mostly by waiting for <abbrtitle="Input and Output">I/O</abbr> operations, so they call them "I/O bound".
85
+
As the execution time is consumed mostly by waiting for <abbrtitle="Input and Output">I/O</abbr> operations, they call them "I/O bound" operations.
86
86
87
87
It's called "asynchronous" because the computer / program doesn't have to be "synchronized" with the slow task, waiting for the exact moment that the task finishes, while doing nothing, to be able to take the task result and continue the work.
88
88
@@ -114,7 +114,7 @@ The cashier gives you the number of your turn.
114
114
115
115
While you are waiting, you go with your crush and pick a table, you sit and talk with your crush for a long time (as your burgers are very fancy and take some time to prepare).
116
116
117
-
As you are seating on the table with your crush, while you wait for the burgers, you can spend that time admiring how awesome, cute and smart your crush is.
117
+
As you are sitting on the table with your crush, while you wait for the burgers, you can spend that time admiring how awesome, cute and smart your crush is.
118
118
119
119
While waiting and talking to your crush, from time to time, you check the number displayed on the counter to see if it's your turn already.
120
120
@@ -132,7 +132,7 @@ Then, when it's your turn, you do actual "productive" work, you process the menu
132
132
133
133
But then, even though you still don't have your burgers, your work with the cashier is "on pause", because you have to wait for your burgers to be ready.
134
134
135
-
But as you go away from the counter and seat on the table with a number for your turn, you can switch your attention to your crush, and "work" on that. Then you are again doing something very "productive", as is flirting with your crush.
135
+
But as you go away from the counter and sit on the table with a number for your turn, you can switch your attention to your crush, and "work" on that. Then you are again doing something very "productive", as is flirting with your crush.
136
136
137
137
Then the cashier says "I'm finished with doing the burgers" by putting your number on the counter display, but you don't jump like crazy immediately when the displayed number changes to your turn number. You know no one will steal your burgers because you have the number of your turn, and they have theirs.
0 commit comments