[Python-Dev] GIL required for _all_ Python calls?

"Martin v. Löwis" martin at v.loewis.de
Thu Jan 7 21:24:32 CET 2010


>> A better rule would be "you may access the memory buffer in a PyString
>> or PyUnicode object with the GIL released as long as you own a
>> reference to the string object." Everything else is out of bounds (or
>> not worth the bother).
> 
> Is that a "yes" regarding the OP's original question about releasing the
> GIL during regexp searches?

No, because the regex engine may also operate on buffers that start
moving around when you release the GIL.

Regards,
Martin



More information about the Python-Dev mailing list