Sha256: 3395afd7bbf9d94b52f8dc65663e332bff66d7f74d6bbf26448401f7b0b119c2
Contents?: true
Size: 1.2 KB
Versions: 13
Compression:
Stored size: 1.2 KB
Contents
# frozen_string_literal: true module RubyRabbitmqJanus module Process # Modules for create autonomous process module Concurrencies # @author VAILLANT Jeremy <jeremy.vaillant@dazzl.tv> # # # Class for manage threads # # @abstract Manage thread in this gem for keepalive message and listen # standard queue. class Concurrency # Initialize class with elements for thread communication def initialize ::Log.info info_thread @rabbit = RubyRabbitmqJanus::Rabbit::Connect.new @lock = Mutex.new @condition = ConditionVariable.new rescue raise Errors::Process::Concurencies::Initializer end private def initialize_thread @rabbit.transaction_long { transaction_running } rescue Interrupt ::Log.info "Stop transaction #{self.class.name}" @rabbit.close end def info_thread "Create an thread -- #{self.class.name}" end attr_reader :lock, :condition, :rabbit end end end end require 'rrj/process/keepalive/keepalive_initializer' require 'rrj/process/event' require 'rrj/process/event_admin'
Version data entries
13 entries across 13 versions & 1 rubygems