Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #88408
| From | Dennis Lee Bieber <wlfraed@ix.netcom.com> |
|---|---|
| Subject | Re: Lockfile hanling |
| Date | 2015-03-31 19:44 -0400 |
| Organization | IISS Elusive Unicorn |
| References | <20150331145012.GA4460@arxnet.hu> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.3.1427845511.12925.python-list@python.org> (permalink) |
On Tue, 31 Mar 2015 16:50:12 +0200, Ervin Hegedüs <airween@gmail.com>
declaimed the following:
>Hello,
>
>there is an app, written in Python, which stores few bytes of
>datas in a single file. The application uses threads. Every
>thread can modify the file, but only one at a time. I'm using a
>lock file to prevent the multiple access.
>
If there is only one instance of the application, and it is truly using
threads...
The solution, to my mind, is to use a Python lock object around the
code that tries to modify the file.
--
Wulfraed Dennis Lee Bieber AF6VN
wlfraed@ix.netcom.com HTTP://wlfraed.home.netcom.com/
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: Lockfile hanling Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2015-03-31 19:44 -0400
csiph-web