I didn't see $wouldBlock getting passed in to flock()?
Yes, I suppose passing $wouldBlock to flock() would help. But I'm not really interested in maintaining this since it will have to be done differently for git.