Lockfile hanling

Ian Kelly ian.g.kelly at gmail.com
Tue Mar 31 16:12:46 EDT 2015


On Tue, Mar 31, 2015 at 1:59 PM, Christian Gollwitzer <auriocus at gmx.de> wrote:
> Am 31.03.15 um 21:17 schrieb Ian Kelly:
>> flock locks are per-process; they won't help for synchronizing access
>> between competing threads in the same process.
>>
>
> Ok. But if it is really all in one process, then a classical mutex would do,
> wouldn't it? I'm not experienced with threading in Python, but it seems from
> the documentation, that threading.Lock() works like a mutex.

As long as there's not *also* some other external process that needs
to access the file occasionally. :-)



More information about the Python-list mailing list