Re: [xml] IO callbacks are not thread-safe



Nick Wellnhofer schrieb:
Michael Ludwig wrote:
What are these input and output callbacks of libxml? Or are they not
part of the Perl interface, just part of the C interface?

With libxml, you can register your own handlers that are called
whenever a URL has to be loaded during processing. E.g. external
subsets, xincludes, imported XSLT stylesheets.

For the Perl bindings have a look at the XML::LibXML::InputCallback
man page.

Thanks, Nick!

I have no idea what the output callbacks are used for.

Maybe someone else? Multiple result documents for XSLT?

I use [threads] to speed up processing on multi-core CPUs. You simply
create a number of threads depending on the number of processors. Then
you post a number of job descriptions on a shared job queue that is
read and processed by each thread. See "man threads" and "man
Thread::Queue" for how to do it in Perl.

threads (3perl) - Perl interpreter threads, or ithreads

Thanks. So ithreads seem to be good for something, it seems.

Michael Ludwig




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]