Killing a running thread

Alexander Skwar ASkwar at DigitalProjects.com
Thu May 2 09:12:14 EDT 2002


»Tim Golden« sagte am 2002-05-02 um 13:55:12 +0100 :
> Hope it was helpful. I meant to reply to the group, not directly to you.
> Would you mind copying my reply to the group, to let others know that I
> responded? Thanks. Tim.

Okay, I'll send this reply back to the group.

However, I'm sorry to say this, but this didn't help me.  My problem is,
that I'm spending a very large time in just one map() function call,
which iterates over a large list and calls a custom method for every
element.   I could of course write a thread wrapper function for this
function, but this doesn't sound very elegant to me.  Further, even if
I'd do this, I wouldn't know how I could jump out of this function
without iterating over the rest of the elements.

Other large amounts of time are spend in a "for zeile in
xreadlines.xreadlines(src):".  Here I could of course use the techniques
from your link.  And finally I'm spending a large chunk of time in
md5s.write(result_str_md5) (md5s is a file object).  For this I would
not know how I could quit the thread at all.

Alexander Skwar
-- 
How to quote:	http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:	http://www.iso-top.de      |    Jabber: askwar at a-message.de
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
                       Uptime: 8 days 8 hours 5 minutes





More information about the Python-list mailing list