Duncan Grisby wrote: > Is there any fundamental reason why the re module cannot release the > interpreter lock, for at least some of the time it is running? The > ideal situation for me would be if it could do most of its work with > the lock released, since the software is running on a multi processor > machine that could productively do other work while the re is being > processed. Failing that, could it at least periodically release the > lock to give other threads a chance to run?
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. Not sure whether this is still an issue. Regards, Martin _______________________________________________ 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