file locking...

bruce bedouglas at earthlink.net
Sun Mar 1 13:00:54 EST 2009


Hi Gabriel.

Except in my situation.. the client has no knowledge of the filenaming
situation, and i might have 1000s of files... think of the FIFO, first in,
first out.. so i'm loking for a fast solution that would allow me to create
groups of say, 500 files, that get batched and processed by the client
app...

so in this situation, the client needs to access the files, group the files,
copy/move the files, process the files...

rather than "lock" the dir for the entire process listed above, the app
could lock the dir/files for the initial access/copy/move process.. and then
release, allowing other client processes to more quickly access the files..
but i'm wondering if there's a faster approach...

thanks


-----Original Message-----
From: python-list-bounces+bedouglas=earthlink.net at python.org
[mailto:python-list-bounces+bedouglas=earthlink.net at python.org]On Behalf
Of Gabriel Genellina
Sent: Sunday, March 01, 2009 9:50 AM
To: python-list at python.org
Subject: Re: file locking...


En Sun, 01 Mar 2009 15:39:56 -0200, bruce <bedouglas at earthlink.net>
escribió:

> the issue that i'm looking at is analogous to a FIFO, where i have lots
> of
> files being shoved in a dir from different processes.. on the other end,
> i
> want to allow mutiple client processes to access unique groups of these
> files as fast as possible.. access being fetch/gather/process/delete the
> files. each file is only handled by a single client process.

I still fail to see why do you need any locking. Could you provide a
concrete example?

Suppose I have 26 processes, each one handles files starting with a
certain letter. This example fits your description perfectly, and no
locking is needed at all.

--
Gabriel Genellina

--
http://mail.python.org/mailman/listinfo/python-list




More information about the Python-list mailing list