low-end persistence strategies?

Paul Rubin http
Thu Feb 17 00:09:12 EST 2005


John Lenton <john at grulic.org.ar> writes:
>             flock(fp, LOCK_EX) # block until can write ...
> Of course I'm probably overlooking something, because it really can't
> be this easy, can it?

Yes, maybe so.  I'm just way behind the times and didn't realize flock
would block until existing incompatible locks are released.  That may
solve the whole timeout/retry problem.  I should have checked the docs
more carefully earlier; I was thinking only in terms of opening with
O_EXCL.  Thanks!



More information about the Python-list mailing list