[Expat-discuss] Multi-Threading in Expat

Karl Waclawek karl at waclawek.net
Thu Mar 25 10:00:27 EST 2004


> On 25 Mar, Karl Waclawek wrote:
> > Expat is not thread safe.
> > As long as you use one parser instance per thread, you are OK.
> 
> Err... Let us get this straight, to avoid confusion. One could also
> have several parser instances in one thread (or even non-MT
> application) in use 'at the same time' in the sense, that every of
> this parser instance is somewhere in the middle of parsing input and
> awaiting the next chunk of data (all in a status after an e.g. 
> XML_Parse(parser, buf, len, 0) call) and they work without confusing
> each other.

Yes, you are right - bad wording on my part.
It should have been: as long as you use a parser instance
only from one thread...

Karl



More information about the Expat-discuss mailing list