title: best way to obtain a lock in php
body: <p>I'm trying to update a variable in APC, and will be many processes trying to do that.</p>
  
  <p>APC doesn't provide locking functionality, so I'm considering using other mechanisms... what I've found so far is mysql's GET_LOCK(), and php's flock(). Anything else worth considering?</p>
  
  <p>Update: I've found sem_acquire, but it seems to be a blocking lock.</p>