class EventMachine::ThreadedResource

def initialize

The block should return the resource that will be yielded in a dispatch.
def initialize
  @resource = yield
  @running = true
  @queue   = ::Queue.new
  @thread  = Thread.new do
    @queue.pop.call while @running
  end
end