[Python-Dev] draft PEP: Trace and Profile Support for Threads
Aahz
aahz@pythoncraft.com
Wed, 23 Apr 2003 18:40:05 -0400
On Wed, Apr 23, 2003, Guido van Rossum wrote:
> Aahz:
>>
>> Hrm. While I don't want to overload what looks like a simple PEP, I'd
>> like some thoughts about how this ought to interact with thread-local
>> storage (if at all). There are some modules (notably the BCD module)
>> that need to keep track of state on a per-thread basis, but without
>> requiring a user of the module to do the work.
>
> IMO you can do thread-local storage just fine by attaching private
> attributes to threading.currentThread().
Agreed -- *if* Jeremy goes for your threading-only solution. If this
PEP hooks in at a lower level, that's going to require that everything
else built on top of threads work at a lower level, too.
Seems to me that this is a good argument for module-level properties,
BTW, or we require that all module attributes be set only through
functions.
--
Aahz (aahz@pythoncraft.com) <*> http://www.pythoncraft.com/
Why is this newsgroup different from all other newsgroups?