Is XdmNode returned by DocumentBuilder.build() thread safe?
Replies (1)
Please register to reply
Added by Martin Honnen over 2 years ago
In the context of https://saxonica.plan.io/boards/4/topics/8669, I am wondering whether the XdmNode returned by DocumentBuilder.build()
in the Java Saxon s9api is meant to be thread safe, i.e. usable in different threads as the input to different Xslt30Transformers?
A Java XdmNode is thread-safe if you use the default TinyTree implementation. It won't be thread-safe if the XdmNode is a wrapper for a DOM node, because DOM isn't thread-safe. The LinkedTree is thread-safe for retrieval operations, but for update, I would need to check.
Please register to reply