[xsd-users] Re: Multi-threading and thread safety in C++/Parser
Boris Kolpackov
boris at codesynthesis.com
Thu Mar 22 10:50:51 EDT 2012
Hi Wahid,
Wahid <hamishagi at yahoo.com> writes:
> 1-is it possible to distribute parsing of different elements, among
> some threads? (or, parse multiple occurrences of an element using
> more than one thread?) if yes, any psudo example?
No. XML parsing is difficult to parallelize because you need to parse
things preceding, say, an element in order to know where this element
starts and ends.
> 2-is thread safety an issue to worry about while using C++/Parser in
> our program?
XSD-generated parser skeletons are thread-safe in the sense that you
can use several instances in several threads concurrently. This is
possible due to the generated code not relying on any writable global
variables.
Boris
More information about the xsd-users
mailing list