Ticket #18 (closed enhancement: wontfix)

Opened 3 months ago

Last modified 2 months ago

EventMachine::post_run and EventMachine::post_runs

Reported by: raggi Assigned to: raggi
Priority: minor Milestone: EventMachine "Framework"
Keywords: Cc: tmm1


In response to one of the problems with wanting to embed multiple EM applications into a single VM, this will allow one to leave pre-reactor loop callbacks, which will occur after the initial run block.

Input welcome.


module EventMachine
  class <<self
    attr_accessor :post_runs
  @post_runs = []
  # Supply either an object responding to #call, or a block.
  # If both a block and object are supplied, both will be added.
  def self.post_run obj = nil, &blk = nil
    @post_runs << obj if obj
    @post_runs << blk if blk
  def self.run
    ... # usual stuffs
    @post_runs.each { |p| p.call }

Change History

06/17/08 14:33:57 changed by tmm1

With the new EM.run behavior, this is probably no longer required.

06/30/08 20:03:42 changed by raggi

  • status changed from new to closed.
  • resolution set to wontfix.

Indeed, and with the new tail behavior, it would probably confuse, closed.