Concurrent Data Processing in Elixir: Chapter 2 Errata: GenServer.cast does not acknowledge (32)

Hello Svilen Gospodinov @svilen,

The book currently states:

When using GenServer.cast/2, we
always get :ok as a reply. In fact, the reply comes almost immediately. This
simply means that the GenServer process has acknowledged the message, while
the actual work is being performed by the process.

But the docs for GenServer.cast/2 state:

This function always returns :ok regardless of whether the destination server (or node) exists. Therefore it is unknown whether the destination server successfully handled the message.

So it is incorrect to state that the “GenServer process has acknowledged the message” when GenServer.cast/2 returns, because the process may already be dead or may not even have existed in the first place.

By the way I’m very much enjoying the book so far!

1 Like