lib/rrj/janus/processus/event.rb in ruby_rabbitmq_janus-2.0.0 vs lib/rrj/janus/processus/event.rb in ruby_rabbitmq_janus-2.1.0.pre.128

- old
+ new

@@ -12,10 +12,16 @@ # # @see file:/config/default.md For more information to config file used. class Event < Concurrency include Singleton + def initalize + super + rescue + raise Errors::Janus::Event::Initializer + end + # Create a thread for execute a block code in a thread # # @param [Proc] block Block code for execute action when queue # standard 'from-janus' receive a message.This block is sending to # publisher created for this thread. @@ -24,9 +30,11 @@ def run(&block) thread.join Thread.new do loop { thread.thread_variable_get(:publish).listen_events(&block) } end + rescue + raise Errors::Janus::Event::Run end private def transaction_running