Class: Yahns::QueueEgg

Inherits:
Object
  • Object
show all
Defined in:
lib/yahns/queue_egg.rb

Overview

this represents a Yahns::Queue before its vivified. This only lives in the parent process and should be clobbered after qc_vivify

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeQueueEgg

Returns a new instance of QueueEgg.



10
11
12
13
# File 'lib/yahns/queue_egg.rb', line 10

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

Instance Attribute Details

#max_eventsObject

:nodoc:



8
9
10
# File 'lib/yahns/queue_egg.rb', line 8

def max_events
  @max_events
end

#worker_threadsObject

:nodoc:



8
9
10
# File 'lib/yahns/queue_egg.rb', line 8

def worker_threads
  @worker_threads
end

Instance Method Details

#vivify(fdmap) ⇒ Object

only call after forking



16
17
18
19
20
# File 'lib/yahns/queue_egg.rb', line 16

def vivify(fdmap)
  queue = Yahns::Queue.new
  queue.fdmap = fdmap
  queue
end