Skip to content

Is nl.adaptivity.xmlutil.serialization.XML threadsafe? #245

Discussion options

You must be logged in to vote

The short answer is no, XML objects are not threadsafe (if you enable caching). I'll document it. Using different instances in different threads should be fine (but sharing the cache across invocations would improve speed).

Alternatively I've implemented the default implementation on dev to use threadlocals for Java/native (not js/wasm). However as some of the types are not public you cannot work around it except by disabling the caching.

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@felixkrull-neuland
Comment options

Answer selected by felixkrull-neuland
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants