Aha, found a different link, but here is one thing that you don’t yet mention (would be cool to have an absolutely authoritative article!)
I’ve not created a test to prove it, but the claim is if you send an :EXIT message, where the “from” PID is that of the parent, then this message is intercepted by the genserver internals and I think this implies that terminate isn’t called in your genserver?
Whilst I realise this may be unusual, I think it might happen in 2 main cases:
-
In testing, you start something to test it, when you stop it, it will get stopped in a different way to that which you expect
-
I see regularly people doing something like Blah.start_link(…) inside their genservers (I know I’m doing this, perhaps unwisely), and near as I can tell this is fine since everything is linked, but it has an implication for how you would stop this linked server later (if you needed to)
Please don’t misunderstand. I was just trying to highlight something I don’t yet understand fully, that perhaps you could include in your blog series. Many thanks for writing it, very helpful!