[xsd-users] Parallelization of the serializer
Boris Kolpackov
boris at codesynthesis.com
Tue Jul 21 12:44:17 EDT 2015
Hi Yury,
Yury Zaytsev <yury.zaytsev at traveltainment.de> writes:
> This brings me to the question of what can I safely assume about the
> thread-safety of the serializer? A naive attempt to cilk_for my
> serialization loop has lead to a segfault, so I assume that it simply
> isn't thread-safe :-)
Yes, underneath it uses Xerces-C++ DOM serializer, about which one
shouldn't make any assumptions ;-).
I think the only approach that has a chance of working is to create
a separate serializer for each "loop iteration" (which in reality
might run in a separate thread).
This will work much better for an XML that doesn't use namespaces
since the serializer maintains a namespace stack. We could probable
even copy it with a bit of effort.
Boris
More information about the xsd-users
mailing list