Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is VTD-XML thread safe? (Java version)

Tags:

vtd-xml

Because if it thread safe I can use just one instance of VTDGen for the entire application.

Right now I am instantiating a new VTDGen for every requests, I am thinking of making it static so that it is initialized just once.

like image 734
Rosdi Kasim Avatar asked Feb 02 '26 21:02

Rosdi Kasim


1 Answers

What do you mean exactly by thread safe? After VTDGen processes one document, and you get vtdNav from it, VTDGen can certainly be reused to process the next document. So in tht sense, it is thread safe, not just in Java, but in C and C++ as well..

like image 173
vtd-xml-author Avatar answered Feb 05 '26 12:02

vtd-xml-author



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!