Skip to content

Instantly share code, notes, and snippets.

@paulmooring
Created March 12, 2013 18:00
Show Gist options
  • Save paulmooring/5145281 to your computer and use it in GitHub Desktop.
Save paulmooring/5145281 to your computer and use it in GitHub Desktop.
[3] pry(main)> f = File.open("/tmp/lol", "w")
=> #<File:/tmp/lol>
[4] pry(main)> f.flock(File::LOCK_EX)
=> 0
[5] pry(main)> g = File.open("/tmp/lol", "w")
=> #<File:/tmp/lol>
[6] pry(main)> g.flock(File::LOCK_EX)
### Hangs 4-eva ###
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment