Digging Deeper
The gen_server is actually rather simple. We haven’t
been through all the interface functions in
gen_server, and we haven’t talked about all the arguments
to all the interface functions. Once you understand the basic
ideas, you can look up the details in the manual page for
gen_server.
In this chapter, we looked only at the simplest possible way
to use gen_server, but this should be adequate for
most purposes. More complex applications often let
gen_server reply with a noreply return value
and delegate the real reply to another process. For information
about this, read the “Design Principles” documentation[37]
and the manual pages for the modules sys and
proc_lib.
This chapter introduced the idea of abstracting the behavior ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access