Sha256: ae473f8ca42b8acb21d7ff1e0550f399b8a9f873209dfc97c56ee34f1f5d9be5

Contents?: true

Size: 253 Bytes

Versions: 3

Compression:

Stored size: 253 Bytes

Contents

# frozen_string_literal: true

module Wayfarer
  GC = Struct.new(:task) do
    def run
      return unless task.counter.decrement <= 0

      task.metadata.job.run_callbacks(:batch)

      task.barrier.reset!
      task.counter.reset!
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
wayfarer-0.4.6 lib/wayfarer/gc.rb
wayfarer-0.4.5 lib/wayfarer/gc.rb
wayfarer-0.4.4 lib/wayfarer/gc.rb