class MR::Factory::PrimaryKeyProvider

Attributes

current[R]
mutex[R]

Public Class Methods

new() click to toggle source
# File lib/mr/factory.rb, line 47
def initialize
  @current = 0
  @mutex   = Mutex.new
end

Public Instance Methods

next() click to toggle source
# File lib/mr/factory.rb, line 51
def next
  @mutex.synchronize{ @current += 1 }
end