class ApolloStudioTracing::ShutdownBarrier
Public Class Methods
new()
click to toggle source
# File lib/apollo-studio-tracing/shutdown_barrier.rb, line 7 def initialize @latch = Concurrent::CountDownLatch.new(1) end
Public Instance Methods
await_shutdown(timeout_secs)
click to toggle source
# File lib/apollo-studio-tracing/shutdown_barrier.rb, line 11 def await_shutdown(timeout_secs) @latch.wait(timeout_secs) end
shutdown()
click to toggle source
# File lib/apollo-studio-tracing/shutdown_barrier.rb, line 15 def shutdown @latch.count_down end
shutting_down?()
click to toggle source
# File lib/apollo-studio-tracing/shutdown_barrier.rb, line 19 def shutting_down? @latch.count.zero? end