[erlang-patches] Selectively receive system messages in gen_server and gen_fsm

Pedram Nimreezi <>
Wed Dec 26 16:35:27 CET 2012

The gen_server and gen_fsm modules do not selectively receive system messages.

This commit addresses that and allows for them to be consistent with gen_event,
as well as possibly taking advantage of the recent improvements to
selective receive.


git fetch git://github.com/DeadZen/otp.git system-selective-receive

Supplemental Questions...
  1. I believe, but I am not sure if the selective receive call
optimization triggers... seems like it should.
  2. I see that gen_event does do a selective receive, and I believe
this is more correct.. is that true?
    <- does
      <- does not
   <- does not
  3. Is gen_event a more recent erlang behaviour than gen_server and gen_fsm?

/* Sincerely
Pedram Nimreezi - Chief Technology Officer  */

// The hardest part of design … is keeping features out. - Donald Norman

More information about the erlang-patches mailing list