The exclusion control of XML class

Please post support and help requests here.
shinshin
Posts: 7
Joined: 12 Mar 2009, 12:00

The exclusion control of XML class

Postby shinshin » 13 Mar 2009, 13:58

I think I will use "XML" class. So I have one question.

When it accesses the same XML file by the multi threading program, would "XML" class do the exclusion control ?
( ex) When it writes the same XML file at the same time.)
Or, it should control the program of oneself ?

guenter
Posts: 1190
Joined: 11 Jul 2006, 16:27
Location: Austria

Re: The exclusion control of XML class

Postby guenter » 13 Mar 2009, 15:13

The DOM classes are not thread safe, so if you want to access the same DOM document from multiple threads, you'll have to do the locking yourself (at least if you're modifying the document - read-only access from multiple threads is okay). This has mostly been done that way for performance reasons - locking has a significant overhead and multithreaded access to the same DOM document is done rarely.

shinshin
Posts: 7
Joined: 12 Mar 2009, 12:00

Re: The exclusion control of XML class

Postby shinshin » 16 Mar 2009, 03:15

I can solve it thanks to your advice.

Thank you.


Return to “Support”

Who is online

Users browsing this forum: Gamadril and 1 guest