Sha256: 20da2eaf3355c467401f58ffd454a2f97dc84dfa7d24281fcafed1be6a52f50c
Contents?: true
Size: 720 Bytes
Versions: 124
Compression:
Stored size: 720 Bytes
Contents
# frozen_string_literal: true module SplitIoClient module Engine class StatusManager def initialize(config) @config = config @sdk_ready = Concurrent::CountDownLatch.new(1) end def ready? return true if @config.consumer? @sdk_ready.wait(0) end def ready! return if ready? @sdk_ready.count_down @config.logger.info('SplitIO SDK is ready') end def wait_until_ready(seconds = nil) return if @config.consumer? timeout = seconds || @config.block_until_ready raise SDKBlockerTimeoutExpiredException, 'SDK start up timeout expired' unless @sdk_ready.wait(timeout) end end end end
Version data entries
124 entries across 124 versions & 1 rubygems