Sha256: 8a37db802432ba6a223012ff608863e5199513732dc8c4e560e136057aee508a

Contents?: true

Size: 328 Bytes

Versions: 4

Compression:

Stored size: 328 Bytes

Contents

$:.unshift File.join(File.dirname(__FILE__), '..', 'lib')

require 'strftime_logger'
require 'parallel'

logger = StrftimeLogger.new("#{__dir__}/test.log")
Parallel.map(['a', 'b'], :in_threads => 2) do |letter|
  3000.times do
    logger.info letter * 5000
  end
end

# egrep -e 'ab' -e 'ba' test.log
# これはまざらない

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
strftime_logger-0.0.4 spec/thread_safe/thread_safe_check.rb
strftime_logger-0.0.3 spec/thread_safe/thread_safe_check.rb
strftime_logger-0.0.2 spec/thread_safe/thread_safe_check.rb
strftime_logger-0.0.1 spec/thread_safe/thread_safe_check.rb