listing threads?

David Bolen db3l at fitlinxx.com
Thu Feb 28 22:34:36 EST 2002


aahz at panix.com (Aahz Maruch) writes:

> DON'T DO THAT.  I'm serious.  You really do NOT want to use
> threading.enumerate(); you'll only confuse yourself.  I've pointed you
> at my web page on threading; is there some reason you haven't read it,
> or is there something you don't understand?

I wouldn't go all that far.  Clearly you have to understand the nature
of the snapshot that threading.enumerate() returns with respect to the
asychronous nature of threads (which of course is what was confusing
the OP, since the example had a thread that barely got off the ground
before exiting).

But I don't see that enumerate() is in and of itself a bad method,
when used properly - certainly not something to warrant such a
sweeping statement.  We certainly use it in some of our applications
as a passive way to get a snapshot of thread activity and it works
fine.

--
-- David
-- 
/-----------------------------------------------------------------------\
 \               David Bolen            \   E-mail: db3l at fitlinxx.com  /
  |             FitLinxx, Inc.            \  Phone: (203) 708-5192    |
 /  860 Canal Street, Stamford, CT  06902   \  Fax: (203) 316-5150     \
\-----------------------------------------------------------------------/



More information about the Python-list mailing list