flock trouble

Antoon Pardon apardon at forel.vub.ac.be
Mon Sep 22 03:52:54 EDT 2008


On 2008-09-08, Seb <sebastianthegreatful at gmail.com> wrote:
> I'm trying to implement a file server using the code below. However
> the locking doesn't work. I can delete while put'ing a file.
>
> Anyone got an idea about why?
>

[code snipped]

As far as I understand you are writing some kind of server. What isn't clear
is whether the daemon is using threading or forking to handle multiple requests.

If I remember correctly, flock doesn't work well with multiple threads. 

-- 
Antoon Pardon



More information about the Python-list mailing list