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.



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

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:



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

def max_events
  @max_events
end

#worker_threadsObject

:nodoc:



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

def worker_threads
  @worker_threads
end

Instance Method Details

#vivify(fdmap) ⇒ Object

only call after forking



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

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