lib/pitchfork/shared_memory.rb in pitchfork-0.10.0 vs lib/pitchfork/shared_memory.rb in pitchfork-0.11.0
- old
+ new
@@ -8,11 +8,12 @@
PER_DROP = Raindrops::PAGE_SIZE / Raindrops::SIZE
CURRENT_GENERATION_OFFSET = 0
SHUTDOWN_OFFSET = 1
MOLD_TICK_OFFSET = 2
- WORKER_TICK_OFFSET = 3
+ MOLD_PROMOTION_TICK_OFFSET = 3
+ WORKER_TICK_OFFSET = 4
DROPS = [Raindrops.new(PER_DROP)]
def current_generation
DROPS[0][CURRENT_GENERATION_OFFSET]
@@ -45,9 +46,13 @@
end
end
def mold_deadline
self[MOLD_TICK_OFFSET]
+ end
+
+ def mold_promotion_deadline
+ self[MOLD_PROMOTION_TICK_OFFSET]
end
def worker_deadline(worker_nr)
self[WORKER_TICK_OFFSET + worker_nr]
end
\ No newline at end of file