Sha256: cd2b8bd93b3af39117e5b1110d6806f42a82cef2b5dea4e0696d17d2363d73f8

Contents?: true

Size: 623 Bytes

Versions: 14

Compression:

Stored size: 623 Bytes

Contents

# Copyright (C) 2013, Eric Wong <normalperson@yhbt.net> and all contributors
# License: GPLv3 or later (https://www.gnu.org/licenses/gpl-3.0.txt)

# this represents a Yahns::Queue before its vivified.  This only
# lives in the parent process and should be clobbered after qc_vivify
class Yahns::QueueEgg # :nodoc:
  attr_accessor :max_events, :worker_threads

  def initialize
    @max_events = 1 # 1 is good if worker_threads > 1
    @worker_threads = 7 # any default is wrong for most apps...
  end

  # only call after forking
  def vivify(fdmap)
    queue = Yahns::Queue.new
    queue.fdmap = fdmap
    queue
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
yahns-1.9.0 lib/yahns/queue_egg.rb
yahns-1.8.0 lib/yahns/queue_egg.rb
yahns-1.7.0 lib/yahns/queue_egg.rb
yahns-1.6.0 lib/yahns/queue_egg.rb
yahns-1.5.0 lib/yahns/queue_egg.rb
yahns-1.4.0 lib/yahns/queue_egg.rb
yahns-1.3.1 lib/yahns/queue_egg.rb
yahns-1.3.0 lib/yahns/queue_egg.rb
yahns-1.2.0 lib/yahns/queue_egg.rb
yahns-1.1.0 lib/yahns/queue_egg.rb
yahns-1.0.0 lib/yahns/queue_egg.rb
yahns-0.0.3 lib/yahns/queue_egg.rb
yahns-0.0.2 lib/yahns/queue_egg.rb
yahns-0.0.1 lib/yahns/queue_egg.rb