Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #26393
| Path | csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <gandalf@shopzeus.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.074 |
| X-Spam-Evidence | '*H*': 0.85; '*S*': 0.00; 'correct,': 0.09; 'immutable': 0.09; 'read()': 0.09; 'threads,': 0.09; 'threads.': 0.09; 'subject:failed': 0.16; 'threads': 0.16; 'fixed.': 0.17; 'memory': 0.18; 'idea': 0.24; 'least': 0.25; 'header:In-Reply- To:1': 0.25; 'header:User-Agent:1': 0.26; 'once,': 0.29; 'usually': 0.30; 'saves': 0.30; 'problem.': 0.32; 'file': 0.32; 'much.': 0.33; 'to:addr:python-list': 0.33; 'agree': 0.34; 'done': 0.34; 'open': 0.35; 'explain': 0.36; 'but': 0.36; 'too': 0.36; 'two': 0.37; 'data': 0.37; 'subject:: ': 0.38; 'easier': 0.38; 'object': 0.38; 'to:addr:python.org': 0.39; 'received:192': 0.39; 'received:192.168': 0.40; 'subject:-': 0.40; 'share': 0.61; 'first': 0.61; 'between': 0.63; 'different': 0.63; 'our': 0.65; 'protect': 0.69; 'received:204': 0.72; 'demand.': 0.91; 'hands': 0.97 |
| Date | Thu, 02 Aug 2012 12:14:14 +0200 |
| From | Laszlo Nagy <gandalf@shopzeus.com> |
| User-Agent | Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20120714 Thunderbird/14.0 |
| MIME-Version | 1.0 |
| To | python-list@python.org |
| Subject | Re: CRC-checksum failed in gzip |
| References | <CAF_E5JahAZ4w3em_aqBbx63pxiTU-nqtRLZWb5_jRQr2yqhRWA@mail.gmail.com> <50190ED6.1040100@shopzeus.com> <mailman.2825.1343826107.4697.python-list@python.org> <501956a7$0$29978$c3e8da3$5496439d@news.astraweb.com> <CAF_E5JZ5=JkR3R=Y9VQ+sp_hCOODMaz2zHRwYVqbexNOCDNX0A@mail.gmail.com> <501961C7.1050405@shopzeus.com> <CAF_E5JamtuPZunDFMaknmBsczRzg7UkxzMsVdy122aQJOrGVKA@mail.gmail.com> <mailman.2845.1343843853.4697.python-list@python.org> <3hrpe9-hbi.ln1@satorlaser.homedns.org> |
| In-Reply-To | <3hrpe9-hbi.ln1@satorlaser.homedns.org> |
| Content-Type | text/plain; charset=ISO-8859-1; format=flowed |
| Content-Transfer-Encoding | 7bit |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.12 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <http://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 | <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.2862.1343902460.4697.python-list@python.org> (permalink) |
| Lines | 16 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1343902460 news.xs4all.nl 6843 [2001:888:2000:d::a6]:42169 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:26393 |
Show key headers only | View raw
> Technically, that is correct, but IMHO its complete nonsense to share > the file object between threads in the first place. If you need the > data in two threads, just read the file once and then share the > read-only, immutable content. If the file is small or too large to be > held in memory at once, just open and read it on demand. This also > saves you from having to rewind the file every time you read it. > > Am I missing something? We suspect that his program reads the same file object from different threads. At least this would explain his problem. I agree with you - usually it is not a good idea to share a file object between threads. This is what I told him the first time. But it is not in our hands - he already has a program that needs to be fixed. It might be easier for him to protect read() calls with a lock. Because it can be done automatically, without thinking too much.
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: CRC-checksum failed in gzip andrea crotti <andrea.crotti.0@gmail.com> - 2012-08-01 14:01 +0100
Re: CRC-checksum failed in gzip Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-08-01 16:17 +0000
Re: CRC-checksum failed in gzip andrea crotti <andrea.crotti.0@gmail.com> - 2012-08-01 17:38 +0100
Re: CRC-checksum failed in gzip Laszlo Nagy <gandalf@shopzeus.com> - 2012-08-01 19:05 +0200
Re: CRC-checksum failed in gzip andrea crotti <andrea.crotti.0@gmail.com> - 2012-08-01 18:17 +0100
Re: CRC-checksum failed in gzip Laszlo Nagy <gandalf@shopzeus.com> - 2012-08-01 19:57 +0200
Re: CRC-checksum failed in gzip Ulrich Eckhardt <ulrich.eckhardt@dominolaser.com> - 2012-08-02 10:49 +0200
Re: CRC-checksum failed in gzip Laszlo Nagy <gandalf@shopzeus.com> - 2012-08-02 12:14 +0200
Re: CRC-checksum failed in gzip andrea crotti <andrea.crotti.0@gmail.com> - 2012-08-02 10:26 +0100
Re: CRC-checksum failed in gzip Laszlo Nagy <gandalf@shopzeus.com> - 2012-08-02 12:21 +0200
Re: CRC-checksum failed in gzip andrea crotti <andrea.crotti.0@gmail.com> - 2012-08-02 11:57 +0100
Re: CRC-checksum failed in gzip andrea crotti <andrea.crotti.0@gmail.com> - 2012-08-02 11:59 +0100
csiph-web