Method: ParallelizedSpecs::SpecLoggerBase#lock_output

Defined in:
lib/parallelized_specs/spec_logger_base.rb

#lock_outputObject

do not let multiple processes get in each others way



44
45
46
47
48
49
50
51
52
53
54
55
# File 'lib/parallelized_specs/spec_logger_base.rb', line 44

def lock_output
  if File === @output
    begin
      @output.flock File::LOCK_EX
      yield
    ensure
      @output.flock File::LOCK_UN
    end
  else
    yield
  end
end