Re: Parallelization on muli-CPU hardware?
From: Aahz (aahz_at_pythoncraft.com)
Date: 10/07/04
- Next message: Alexander Schmolck: "Re: Python-Matlab extensions: Comparisons?"
- Previous message: Pepo: "Any Job opportunity in South Florida?"
- In reply to: Alex Martelli: "Re: Parallelization on muli-CPU hardware?"
- Next in thread: Alex Martelli: "Re: Parallelization on muli-CPU hardware?"
- Reply: Alex Martelli: "Re: Parallelization on muli-CPU hardware?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 7 Oct 2004 14:57:37 -0400
In article <1glawed.1e83ntp1ck15pvN%aleaxit@yahoo.com>,
Alex Martelli <aleaxit@yahoo.com> wrote:
>Aahz <aahz@pythoncraft.com> wrote:
>> In article <1glatga.8upk9brifr2qN%aleaxit@yahoo.com>,
>> Alex Martelli <aleaxit@yahoo.com> wrote:
>>>Aahz <aahz@pythoncraft.com> wrote:
>>>>
>>>> The problem is that CPython doesn't have thread-local storage.
>>>
>>>In 2.4 it does -- see threading.local documentation at
>>><http://www.python.org/dev/doc/devel/lib/module-threading.html> (and
>>>even better, the docstring of the new _threading_local module).
>>
>> IIUC, that's not thread-local storage in the sense that I'm using the
>> term (and which I believe is standard usage). Values created with
>> thread-local storage module are still allocated on the heap, and it's
>> still possible to use introspection to access thread-local data in
>> another thread.
>
>Is it...? Maybe I'm missing something...:
If you look at the code for _threading_local, you'll see that it depends
on __getattribute__() to acquire a lock and patch in the current
thread's local state. IIRC from the various threads about securing
Python, there are ways to break __getattribute__(), but I don't remember
any off-hand (and don't have time to research).
-- Aahz (aahz@pythoncraft.com) <*> http://www.pythoncraft.com/ WiFi is the SCSI of the 21st Century -- there are fundamental technical reasons for sacrificing a goat. (with no apologies to John Woods)
- Next message: Alexander Schmolck: "Re: Python-Matlab extensions: Comparisons?"
- Previous message: Pepo: "Any Job opportunity in South Florida?"
- In reply to: Alex Martelli: "Re: Parallelization on muli-CPU hardware?"
- Next in thread: Alex Martelli: "Re: Parallelization on muli-CPU hardware?"
- Reply: Alex Martelli: "Re: Parallelization on muli-CPU hardware?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]