Re: [xml] thread safe?

Thanks for the replies from all of you!

I don't think I'm in too bad shape, then:
--I'm not using trio (I'm still using 2.2.12 because that's where I started
my development and don't want to change midstream, and 2.2.12 doesn't use
--I'm carefully using the xx_r functions wherever they exist
--I'm not using libz or iconv or libxslt.
--I'm using only two limited parts of libxml: to build a tree similar to
(but more code) the tree example in the docs, and using callbacks to pull
out two fields from a trivial msg I receive.
--I'm not using libxml to do i/o except for letting it load the dtd from
file when creating my outgoing XML. I'm managing my own network i/o.

Daniel Veillard <veillard redhat com> on 06/26/2001 11:28:36 AM

Please respond to veillard redhat com

To:   Gary Pennington <Gary Pennington uk sun com>
cc:   David Frascone <dave frascone com>, Fred Smith/Computrition,
      xml gnome org
Subject:  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
subtleties which need to be examined.

libxml and libxslt are not thread-aware. That means that unless you take
precautions when linking with either library from a multi-threaded
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
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
xml mailing list
xml gnome org

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