>#post_init was originally invented because of protocol handlers that are >...invented later.) I''m not proposing to eliminate #post_init, but it''s >probably a good idea to avoid it in new code.Thoughts? Maybe for now add a boolean "run block before post init or after" as a way to bypass the decision :) I''d also be down with my previous suggestion (being able to pass a block which operates on the newly mixed-in class once, then execute the ''normal'' block on every connection), but I''m not sure if that''s possible or if it would be efficient. Just thinking out loud. EM Rox. -Roger -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/eventmachine-talk/attachments/20071023/f9708275/attachment.html
Francis Cianfrocca
2007-Oct-23 15:08 UTC
[Eventmachine-talk] start_server block executed in the
On 10/23/07, Roger Pack <rogerpack2005 at gmail.com> wrote:> > > >#post_init was originally invented because of protocol handlers that are > >...invented later.) I''m not proposing to eliminate #post_init, but it''s > >probably a good idea to avoid it in new code. > > Thoughts? > > Maybe for now add a boolean "run block before post init or after" as a way > to bypass the decision :) I''d also be down with my previous suggestion > (being able to pass a block which operates on the newly mixed-in class once, > then execute the ''normal'' block on every connection), but I''m not sure if > that''s possible or if it would be efficient. > Just thinking out loud.Can you suggest a syntax for how this would work, with the secondary block? I don''t like the idea of a boolean flag because I''d rather just make a decision one way or the other :-) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/eventmachine-talk/attachments/20071023/f0055e05/attachment.html