Sha256: e69985162a0bb9dff153decdfaf91d4f187daa0b8bdd299d28d744eccd299d3e
Contents?: true
Size: 729 Bytes
Versions: 2
Compression:
Stored size: 729 Bytes
Contents
module Micron class Runner class LivenessChecker class Pong include Debug attr_reader :thread def initialize(reader, writer) @thread = Thread.new(reader, writer) { |reader, writer| Thread.current[:name] = "ponger" debug "thread started" begin writer.sync = true while line = reader.readline debug "got ping request, replying" writer.puts "pong" end rescue Exception => ex debug "caught error: #{Micron.dump_ex(ex)}" end debug "thread exiting from #{$$}" } end end # Pong end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
micron-0.5.1 | lib/micron/runner/liveness_checker/pong.rb |
micron-0.5.0 | lib/micron/runner/liveness_checker/pong.rb |