Skip to content

Commit c0a864c

Browse files
zachdanielggVGc
authored andcommitted
use simpler words in mix-and-otp guides (elixir-lang#14630)
1 parent 20509c3 commit c0a864c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/elixir/pages/mix-and-otp/erlang-term-storage.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ may be failing on this line:
166166

167167
How can this line fail if we just created the bucket in the previous line?
168168

169-
The reason those failures are happening is because, for didactic purposes, we have made two mistakes:
169+
The reason those failures are happening is because, for educational purposes, we have made two mistakes:
170170

171171
1. We are prematurely optimizing (by adding this cache layer)
172172
2. We are using `cast/2` (while we should be using `call/2`)

lib/elixir/pages/mix-and-otp/genservers.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ So far we have used three callbacks: `handle_call/3`, `handle_cast/2` and `handl
319319

320320
1. `handle_call/3` must be used for synchronous requests. This should be the default choice as waiting for the server reply is a useful back-pressure mechanism.
321321

322-
2. `handle_cast/2` must be used for asynchronous requests, when you don't care about a reply. A cast does not guarantee the server has received the message and, for this reason, should be used sparingly. For example, the `create/2` function we have defined in this chapter should have used `call/2`. We have used `cast/2` for didactic purposes.
322+
2. `handle_cast/2` must be used for asynchronous requests, when you don't care about a reply. A cast does not guarantee the server has received the message and, for this reason, should be used sparingly. For example, the `create/2` function we have defined in this chapter should have used `call/2`. We have used `cast/2` for educational purposes.
323323

324324
3. `handle_info/2` must be used for all other messages a server may receive that are not sent via `GenServer.call/2` or `GenServer.cast/2`, including regular messages sent with `send/2`. The monitoring `:DOWN` messages are an example of this.
325325

0 commit comments

Comments
 (0)