I just wonder whether REXML library (especially REXML::Document) is thread safe in jruby?
I just wonder whether REXML library (especially REXML::Document) is thread safe in jruby?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It is not perfectly thread-safe: there are some class variables in the REXML classes that could be modified at any time by more than one thread (e.g., Document::entity_expansion_limit). However, most of the code is thread safe (no autoloading, for example); if you are not using those dangerous bites, you can use it without any problem.
Or you could use Nokogiri that is thread-safe by design (modulo bugs).