Re: [xml] libxml2 thread safety



On Tue,  2 October 17:33 Daniel Veillard wrote:
 On Tue, Oct 02, 2001 at 04:59:07PM +0100, Gary Pennington wrote:
 > This brings up a very important point which I omitted to mention.
 >
 > I hope that anyone who has developed a "thread-safe" (I use quotes
 > because programming convention safety is not the same as real safety,
 > but it is often enough for any given application)  solution which is not
 > based on pthreads will NOT be affected by this work. They should be able
 > to compile the new  libxml2 and find that their application behaves as
 > it always has done. The combination of configure and the macros
 > REENTRANT and POSIX_C_SOURCE etc.. identify code which is being compiled
 > for a pthreads environment and will allow us to configure the library
 > "correctly" for any given execution environment. If the
    Too complex.

Surely the correct way forward is to code thread safety using the pthreads
API (Posix standard and well designed) and then implement that API (or at
least the parts of it needed by libxml/xslt) for other non-pthreads platforms.

With a little care and perhaps sticking to a subset of the full pthread API
it is possible to avoid some of the subtler aspects of pthreads.  This will
simplify the work needed to wrap, say the 'doze32 thread APIs with pthread
compatible APIs.

Just my tuppence worth :)

Brian Stafford




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