in reply to Re^4: What's the deal with apostrophes?
in thread What's the deal with apostrophes?

Can you explain the file locking thing a little more for me please?
Suppose your site gets so much traffic, you have two people requesting your page almost at the same time. So you have two instances of your count program opening the counter file, reading in the value, incrementing it, and writing the new value back. If the second instance reads the value before the first instance has written the new value, your count will be off. And you're back to writing a script processing the log files. Which I would think is far more enjoyable than writing 1995 style counters, but you don't.
  • Comment on Re^5: What's the deal with apostrophes?