[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: [xml] IO callbacks are not thread-safe
- From: Nick Wellnhofer <wellnhofer aevum de>
- To: veillard redhat com
- Cc: xml gnome org
- Subject: Re: [xml] IO callbacks are not thread-safe
- Date: Mon, 06 Apr 2009 17:59:00 +0200
Daniel Veillard wrote:
> On Thu, Apr 02, 2009 at 05:33:54PM +0200, Petr Pajas wrote:
>> I think the original reason for this was that when Perl bindings are
>> used with mod_perl, there may be other (non-Perl) components using
>> the global callbacks differently; that's why XML::LibXML Perl
>> module tries to clean after itself (restoring whatever was in the
>> callbacks previously). Is there any other way around this?
>
> Urgh ..
> Why do they need global URI handler registration ?
> The cleanest wey would be to always use the I/O parser context creation
> routine like xmlCtxtReadIO/xmlReadIO... and define the I/O handlers
> to map to whatever is being registered globally now. Though the
> limitation is for external subset resources, that doesn't work well.
Yes, this wouldn't work for things like imported XSLT stylesheets or
documents loaded with the XSLT document() function.
> Maybe we need to make those per-thread but this is getting ugly !
For me personally, it would be OK if the Perl bindings had an option to
not touch the callbacks at all. We wouldn't need any changes on the
libxml side then. Only a caveat on this page would be nice:
http://xmlsoft.org/threads.html
Nick
--
aevum gmbh
rumfordstr. 4
80469 münchen
germany
tel: +49 89 3838 0653
http://aevum.de/
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]