concept handle_cast/2 in category elixir

appears as: hdle_cast/2
The Little Elixir & OTP Guidebook

This is an excerpt from Manning's book The Little Elixir & OTP Guidebook.

The biggest benefits of using OTP are all the things you don’t have to worry about when you write your own client-server programs and supervisors. For example, how would you write a function that makes an asynchronous request? What about a synchronous one? The GenServer behavior provides handle_cast/2 and handle_call/3 for those exact use cases.

GenServer.terminate/2 has two arguments. The first provides a reason why the server terminated. In a normal termination, reason is :normal, which comes from the response from handle_cast/2, defined earlier. For errors—for example, arising from caught exceptions—you could include other reasons. Finally, GenServer.terminate/2 must always return :ok. Let’s see how to terminate a server in iex: