Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #88402

Re: Lockfile hanling

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed3a.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <ian.g.kelly@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.062
X-Spam-Evidence '*H*': 0.88; '*S*': 0.00; 'python,': 0.02; "wouldn't": 0.14; ':-)': 0.16; 'do,': 0.16; 'wrote:': 0.18; 'seems': 0.21; '31,': 0.24; 'header:In-Reply-To:1': 0.27; 'external': 0.29; 'message-id:@mail.gmail.com': 0.30; "i'm": 0.30; 'ok.': 0.31; 'file': 0.32; 'but': 0.35; 'received:google.com': 0.35; 'really': 0.36; 'christian': 0.38; 'process,': 0.38; 'to:addr:python-list': 0.38; 'pm,': 0.38; 'to:addr:python.org': 0.39; 'ian': 0.60; 'between': 0.67; 'mar': 0.68; '2015': 0.84
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=nTprzxKFB18PHNSRSEX4BJLTaZS8lMw0xch54W4hux0=; b=z683uLo80OlJt2EkbUDdbVfK2L+yLRRro7aSlXb5loXxFh69oUgQcjMV1ACdk11Hrp HfAHFjaeLeWjtIkAWHBAkCBAwhftaxZBTza/FOB+BvyugwOOKMVkZcSkg4yanuID/E98 zgfVEK+Vr5gvxytUutD7C+PUOZHFVLmyj16AEtGnmczi8Wf0hKOODu4xIFwVc1jFDgPl Tliip522efkjZeapqAWOEL1f+Saq9uoQd2cOMmpMGWxtlroZvXC2Dxup+s21pVZ1UVGy Sfm5YsTmWtU4WdLuw29NtJgS15Vgp7FoVpAGoSEFZyjA6PPFVW8fcU3bPm5DXbLEjXpo oEPA==
X-Received by 10.70.65.73 with SMTP id v9mr27835579pds.96.1427832806623; Tue, 31 Mar 2015 13:13:26 -0700 (PDT)
MIME-Version 1.0
In-Reply-To <mfeu9p$c6l$1@dont-email.me>
References <mailman.374.1427813384.10327.python-list@python.org> <mfeqm7$r6e$1@dont-email.me> <mailman.385.1427829474.10327.python-list@python.org> <mfeu9p$c6l$1@dont-email.me>
From Ian Kelly <ian.g.kelly@gmail.com>
Date Tue, 31 Mar 2015 14:12:46 -0600
Subject Re: Lockfile hanling
To Python <python-list@python.org>
Content-Type text/plain; charset=UTF-8
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.19
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.386.1427832810.10327.python-list@python.org> (permalink)
Lines 12
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1427832810 news.xs4all.nl 2872 [2001:888:2000:d::a6]:57089
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:88402

Show key headers only | View raw


On Tue, Mar 31, 2015 at 1:59 PM, Christian Gollwitzer <auriocus@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. :-)

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Lockfile hanling Ervin Hegedüs <airween@gmail.com> - 2015-03-31 16:50 +0200
  Re: Lockfile hanling Christian Gollwitzer <auriocus@gmx.de> - 2015-03-31 20:58 +0200
    Re: Lockfile hanling Ian Kelly <ian.g.kelly@gmail.com> - 2015-03-31 13:17 -0600
      Re: Lockfile hanling Christian Gollwitzer <auriocus@gmx.de> - 2015-03-31 21:59 +0200
        Re: Lockfile hanling Ian Kelly <ian.g.kelly@gmail.com> - 2015-03-31 14:12 -0600
        Re: Lockfile hanling Sturla Molden <sturla.molden@gmail.com> - 2015-04-01 23:51 +0000

csiph-web