[Expat-discuss] Multithread problem.

Groleo Marius groleo at gmail.com
Sun May 8 08:40:26 CEST 2005


On 5/7/05, Golibasku <ceo at absoft-net.com> wrote:
> Hi,
> 
> I have the following problem. When expat work in multi-thread application,
> it will crash. I know that there may be some bug in my application. But
> anyone know whether the following scenario is ok ?
> 
> I have one thread which will parse an XML file by using XML_Parse(...)
> when the XML_Parse is working, another thread will parse another XML file by
> using XML_Parse(...)
> 
> There are 2 instance of XML_Parser which are created by XML_Create(). But
> the handler is the same.
> 

You have to check if the handlers are thread-safe.
After that, you should create a new parser instance per thread.
> 
> _______________________________________________
> Expat-discuss mailing list
> Expat-discuss at libexpat.org
> http://mail.libexpat.org/mailman/listinfo/expat-discuss
> 
> 
> 


-- 
Regards, Groleo!

# touch universe
# chmod +rwx universe
# ./universe


More information about the Expat-discuss mailing list