On Thu, Mar 5, 2009 at 3:46 PM, Philip Jenvey <[email protected]> wrote:
>
>
> On Mar 4, 2009, at 1:58 PM, kgs wrote:
>
>>
>> I could not find anywhere unambigous answer if accessing Python
>> primitives from many threads is safe or not - for me it looks that it
>> might be not safe (because modyfing/iterating/accessing e.g.
>> dictionary may result in context switches).
>
> This is the most authoritative page:
>
> http://effbot.org/pyfaq/what-kinds-of-global-value-mutation-are-thread-safe.htm
>
> It's still a bit ambiguous on what is really safe, but I can guarantee
> the two basic dict operations in question (a getitem and setitem on
> steady dict value) are in fact safe.

Although, if I read this correctly, you are counting on the fact the
current implementation of the GIL will always remain exactly this way
for the operations getitem and setitem.  That seems to be a fairly
safe bet though, right?

> --
> Philip Jenvey
>
>
> >
>



-- 
Cheers,

Noah

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to