Note that the implemented function is NOT a fully faithful recreation of what actually happens inside a GenServer.call function. For that, read the source! github.com/erlang/otp/blob/ee9628e7ed09ef02e767994a6da5b7a225316aaa/lib/stdlib/src/gen.erl#L219-L279 In fact, the code that I've written as-is contains a fatal race condition (this is why you shouldn't reinvent GenServers)! See if you can find it.
I wish developers from "other programming environments" saw this, digested it - and fell in love with the BEAM. Thanks for educating us on these details!
Note that the implemented function is NOT a fully faithful recreation of what actually happens inside a GenServer.call function. For that, read the source! github.com/erlang/otp/blob/ee9628e7ed09ef02e767994a6da5b7a225316aaa/lib/stdlib/src/gen.erl#L219-L279
In fact, the code that I've written as-is contains a fatal race condition (this is why you shouldn't reinvent GenServers)! See if you can find it.
I love the way you break things down. Unpacking the inside vs outside of a GenServer brings so much into focus. Thanks ❤
I wish developers from "other programming environments" saw this, digested it - and fell in love with the BEAM. Thanks for educating us on these details!
Sir love your videos, keep making them
Love these
It's such an important detail that the calling process exits, not the overloaded GenServer.
excellent video