phax / ph-schematron

Java Schematron library that supports XSLT and native application
Apache License 2.0
116 stars 36 forks source link

Thread-safety of SchematronResourceXSLT #132

Closed qligier closed 1 year ago

qligier commented 2 years ago

Hi,

I'm wondering if SchematronResourceXSLT is thread-safe when initialized? SchematronResourcePure says in its javadoc that it's thread-safe when it's initialized because the underlying cache is thread-safe. As SchematronResourceXSLTCache is also thread-safe, can we assume the same for SchematronResourceXSLT (once the XSLT has been compiled)?

Thanks!

phax commented 1 year ago

@qligier sorry for that very late response - I missed it :( You are right, the SchematronResourceXSLT is thread-safe after being initialized. Hope you figured that out yourself as well :)

qligier commented 1 year ago

Thank you for the answer! I think I assumed it was, after looking a bit at the code.