[lxml-dev] etree.clear_error_log() causes segfaults
Stefan Behnel
stefan_ml at behnel.de
Wed Feb 4 20:47:55 CET 2009
Hi,
Christian Heimes wrote:
> This is a friendly word of warning! Don't call etree.clear_error_log()
> from multiple threads.
>
> We found this issue during stress tests of our CherryPy based
> application. Every worker thread was calling etree.clear_error_log()
> after the page was rendered. Apparently we hit some sort of race condition.
Thanks for the heads-up. The global error log is actually not thread-local,
so there's not much sense in calling the function above in threaded code -
or even using the global log at all.
The log that comes with API objects like XPath, XSLT and validators should
work as expected, though.
Stefan
More information about the lxml-dev
mailing list