portalocker in Win98

Richard Jones rjones at ekit-inc.com
Wed Jan 15 18:16:01 EST 2003


On Thu, 16 Jan 2003 9:59 am, Richard Jones wrote:
> On Wed, 15 Jan 2003 7:37 pm, James Kew wrote:
> > Thomas Heller wrote:
> > > But even they may not be needed, there's the little known msvcrt
> > > module included in standard Python, which also has a locking function.
> >
> > Again, this doesn't support blocking locks -- the docs say it polls for a
> > lock 10 times at 1-second intervals before giving up. It also has the
> > rather odd property of locking for a range of bytes in the file starting
> > from the current file position.
>
> The 10x 1-second rety is probably sufficient. I haven't seen the API, but
> that could probably be wrapped in a "while 1:", yes?

This thread on python-win32 looks like it might have the solution:

   http://mail.python.org/pipermail/python-win32/2001-August/000123.html

(since I want a blocking, exclusive lock :)


     Richard






More information about the Python-list mailing list