Skip to content

Commit

Permalink
fix race condition in threaded XSLT processing
Browse files Browse the repository at this point in the history
  • Loading branch information
scoder committed Mar 26, 2012
1 parent ec5a50e commit 26ae51c
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/lxml/xslt.pxi
Original file line number Diff line number Diff line change
Expand Up @@ -390,8 +390,7 @@ cdef class XSLT:
c_doc._private = <python.PyObject*>self._xslt_resolver_context

self._error_log.connect()
with nogil:
c_style = xslt.xsltParseStylesheetDoc(c_doc)
c_style = xslt.xsltParseStylesheetDoc(c_doc)
self._error_log.disconnect()

if c_style is NULL or c_style.errors:
Expand Down Expand Up @@ -511,7 +510,6 @@ cdef class XSLT:
transform_ctxt.profile = 1

try:
self._error_log.connect()
context = self._context._copy()
context.register_context(transform_ctxt, input_doc)

Expand Down Expand Up @@ -540,7 +538,6 @@ cdef class XSLT:
if context is not None:
context.free_context()
_destroyFakeDoc(input_doc._c_doc, c_doc)
self._error_log.disconnect()

try:
if resolver_context is not None and resolver_context._has_raised():
Expand Down

0 comments on commit 26ae51c

Please sign in to comment.