Sha256: 8dd16ab4ed5fb788f20a2806052879e1630b9341fc16928c5604b271ccaf4cf1

Contents?: true

Size: 259 Bytes

Versions: 1

Compression:

Stored size: 259 Bytes

Contents

require_relative "../lib/asynchronous"

SharedMemory.test_value= 0
async :OS do

  loop do
    SharedMemory.test_value += 1
    sleep 3
  end

end

loop do
  if SharedMemory.test_value >= 10
    Process.exit
  end
  puts SharedMemory.test_value
  sleep 1
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
asynchronous-2.0.0 examples/shared_memory.rb