From 6733af0546a759b73fd63880e8ef2549caf4c4f2 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sun, 26 Dec 2010 23:16:41 +0000 Subject: never_block: simplify and split out code alias_method is a mess, super is superb! --- lib/rainbows/never_block/event_machine.rb | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'lib/rainbows/never_block/event_machine.rb') diff --git a/lib/rainbows/never_block/event_machine.rb b/lib/rainbows/never_block/event_machine.rb index 0cfaa21..e201492 100644 --- a/lib/rainbows/never_block/event_machine.rb +++ b/lib/rainbows/never_block/event_machine.rb @@ -1,8 +1,13 @@ # -*- encoding: binary -*- # :enddoc: -module Rainbows - module NeverBlock - class Client < Rainbows::EventMachine::Client +class Rainbows::NeverBlock::Client < Rainbows::EventMachine::Client + def app_call + POOL.spawn do + begin + super + rescue => e + handle_error(e) + end end end end -- cgit v1.2.3-24-ge0c7