Beginner Threaded file reading access
Ben Finney
bignose-hates-spam at and-benfinney-does-too.id.au
Wed Mar 24 16:50:15 EST 2004
On 24 Mar 2004 14:06:31 -0800, Andy Robinson wrote:
> aahz at pythoncraft.com (Aahz) wrote in message news:<c3q8jq$aj4$1 at panix3.panix.com>...
>> In article <2835a96b.0403230909.35be2b7b at posting.google.com>,
>> Jesse Noller <jnoller at reference-info.com> wrote:
>> >With 5 threads - I need each of the 5 threads to read 1 line from
>> >the file (but never the same line) and perform the processing.
>>
>> Bad idea. Never access the same external resource from multiple
>> threads.
>
> Unless each line was a URL which needed a test suite running against
> it, or the name of a file needing significant independent processing?
Nope. If you want multiple threads to *process the line*, that's great;
but only one thread should be *reading the file*.
--
\ "No one ever went broke underestimating the taste of the |
`\ American public." -- Henry L. Mencken |
_o__) |
Ben Finney <http://bignose.squidly.org/>
More information about the Python-list
mailing list