Sha256: 7a9199c7420e3188654c91ab717d73b989c3d9afa4f69babf508b55646be835b
Contents?: true
Size: 477 Bytes
Versions: 15
Compression:
Stored size: 477 Bytes
Contents
require 'thread' require_relative 'base' module Anschel class Output class Device < Base def initialize config, stats, log path = config.delete(:path) || '/dev/stdout' qsize = config.delete(:queue_size) || 2000 @queue = SizedQueue.new qsize @thread = Thread.new do File.open(path, 'w') do |f| loop do f.puts @queue.shift end end end end end end end
Version data entries
15 entries across 15 versions & 1 rubygems