Question about Python threads

Aahz aahz at pythoncraft.com
Tue Aug 27 11:23:06 EDT 2002


In article <ad496f8.0208262256.59ec14ef at posting.google.com>,
Ville Vainio <vvainio at tp.spt.fi> wrote:
>Greg Ewing <see_reply_address at something.invalid> wrote in message news:<3D6AE99C.5060202 at something.invalid>...
>
>> a GIL. Even without refcounting, lack of a GIL would
>> require locks around many other things, e.g. anything
>> which mutates an object (inserting/deleting list
>> items, etc.) Also object allocation, which I suspect
>
>I don't think object mutation would be that much of a problem - it's
>natural for programmers to *assume* that manupulating such data
>structures is not thread safe, and expecting programmers to use
>explicit mutexes or use thread safe versions of the objects wouldn't
>really be too radical. At least I automatically assume that any
>manipulation of common data is not threadsafe.

don't know how jython handles this, but *every* cpython object is global
global (not just module global)

(note fir thosae not on py-dev: my wrist broke)
-- 
Aahz (aahz at pythoncraft.com)           <*>         http://www.pythoncraft.com/

Project Vote Smart: http://www.vote-smart.org/



More information about the Python-list mailing list