Sha256: 766970b32edc7d37e91cff5c913401e947bc030e0e9e5b81e0a89a01b8b25b36
Contents?: true
Size: 577 Bytes
Versions: 84
Compression:
Stored size: 577 Bytes
Contents
# frozen_string_literal: true module SplitIoClient module Helpers class ThreadHelper def self.stop(thread_sym, config) thread = config.threads[thread_sym] unless thread.nil? config.logger.debug("Stopping #{thread_sym} thread...") if config.debug_enabled Thread.kill(thread) end rescue StandardError => e config.logger.error(e.inspect) end def self.alive?(thread_sym, config) thread = config.threads[thread_sym] thread.nil? ? false : thread.alive? end end end end
Version data entries
84 entries across 84 versions & 1 rubygems