Re: [xml] thread safe?

On Tue, Jun 26, 2001 at 03:51:09PM +0100, Gary Pennington wrote:

Apologies for the long answer, but it's a complex issue and there are certain
subtleties which need to be examined.

libxml and libxslt are not thread-aware. That means that unless you take special
precautions when linking with either library from a multi-threaded application,
things will go wrong.

  I think the picture given by Gary is a bit pessimistic. Of course if
the libc is broken w.r.t being thread safe, then you have problems.
For the most part people should make sure the library is initialized properly
before starting a multithreaded task, parsing from 2 different files
should work, ith there is some associated network access, then yes it will
be more dependant on the few underlying function used. I don't know
if iconv and libz are thread safe, I hope so. libxml don't call any other
  errno is used only for error case identification in the encoding and
I/O part, I would be glad to be able to remove it's use if it was
  localtime is used only by the memory debug save, it will never be called
by applications
  strtok is used by trio, so basically if your platform is decent, it
will never be used.


Daniel Veillard      | Red Hat Network
veillard redhat com  | libxml Gnome XML XSLT toolkit | Rpmfind RPM search engine
Sep 17-18 2001 Brussels Red Hat TechWorld

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