Sha256: 0a7be29cddbf8f1e4960151e0feb9a7f12993b6680798fec5f2ee8160d0e1444
Contents?: true
Size: 463 Bytes
Versions: 8
Compression:
Stored size: 463 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} ...") sleep(0.1) while thread.status == 'run' Thread.kill(thread) end rescue StandardError => error config.logger.error(error.inspect) end end end end
Version data entries
8 entries across 8 versions & 1 rubygems