Re: [xml] threading work

Daniel Veillard wrote:

On Thu, Oct 11, 2001 at 05:34:27PM +0100, Gary Pennington wrote:


I've done enough work to be able to get libxml2 to behave well in terms of the TSD part of the thread-safe reworking.

Daniel asked me to submit diffs to the list and also any new files which are required, so here goes. Be warned, this code is rough and needs a lot of polishing. There are some comments...

 Okay I had a quick look (I'm busy rewriting the catalog.c module).
It's pretty much what I expected, I will probably have to reformat
part of it to stick with existing naming conventions and such but
it's mostly aesthetic. Through my quick browsing I noted 2 things:
  - there is a lock in the parser context, I don't really understand
    why it's needed, after all only a single thread at a time should
    be able to make use of that context ???

The lock is a work in progress idea. I should have removed it before I posted. In other words, it can be safely deleted.

  - the Nan, Inf etc. global variables in xpath.c have been made static,
    though they are currently part of the API (and reused by libxslt for
    example). I think those shall be initialized at the very beginning
    and considered constant thereafter.

Ok, I made them static when I thought nothing would be using them. If they are const we can ignore them (like the xmlStringComment type and friends variables) or I can add them to my file from which global_functions.[ch] are generated. Let me know what you would rather do.

NB: All the development has been done against 2.4.5 which was the latest stable release when I started doing this.

 Okay, there is no big changes in 2.4.6 which would give troubles.
But any patch against catalog.c it nearly garanteed to fail. On the other
hand I'm trying to make threading easier on that part (that was one of the
worse piece in libxml thread-wise).


New Files

 I will probably rename them, I prefer to stick to short plain filenames.
Similar to new APIs introduced xml prefix and polish notation, not a big deal
I will take care of this.


Ok, that's it for now.

 And that's a lot ! Thanks for working on this,


You're welcome, I'm happy to be making a contribution and I'm a benefactor as well.


Gary Pennington
Solaris Kernel Development,
Sun Microsystems
Gary Pennington sun com

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