Skip to content

Instantly share code, notes, and snippets.

@raphael
Created July 20, 2009 20:15
Show Gist options
  • Save raphael/150871 to your computer and use it in GitHub Desktop.
Save raphael/150871 to your computer and use it in GitHub Desktop.
puts "Synchronous read: #{File.read('/sys/block/ram0/size')}"
puts "Asynchronous read..."
t = Thread.new do
puts File.read('/sys/block/ram0/size')
puts 'Done reading'
end
t.join
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment