Hi all,

I've implemented a patch,  please visit bug 1366311 for details.

https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1366311&group_id=5470

This patch only release the GIL when the engine perform a low level search *and* if the object searched is a string or a unicode string. The GIL will not be released for any other kind of objects, as there is no guarantee of immutability of the buffer during the run.

I've tested this with a couple of simple tests, and also by running the application Duncan talked about. My testing indicates that everything works as before with the added value that our application is still responsive even when processing some of the more egregious regular expressions.

As it is my first foray into python module writing I'll welcome any feedback you may have on the patch.

Regards,
-- Eric


On 11/25/05, Fredrik Lundh <[EMAIL PROTECTED] > wrote:
Martin v. Löwis wrote:

> Formally: no; it access a Python string/Python unicode object all
> the time.
>
> Now, since all the shared objects it accesses are immutable, likely
> no harm would be done releasing the GIL. I think SRE was originally
> also intended to operate on array.array objects; this would have
> caused bigger problems.

SRE can operate on anything that implements the buffer interface.

</F>


_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to