[Mono-dev] Patch: XSLT thread safety

Atsushi Eno atsushi at ximian.com
Mon Jul 14 08:25:40 EDT 2008


Hey,

Thanks for the patch, but I don't think it makes things better.
It adds extra newobj cost at every transformation time, while we
could just do it only once. And XslTransform does not have to be
thread safe. If you use XslTransform in multithread scenario, you
must create XslTransform for each thread.

Atsushi Eno


Joshua Tauberer wrote:
>  From time to time I encounter index out of range errors in 
> Mono.Xml.Xsl.XslSortEvaluator during my multi-threaded use of a single 
> XSLT transform object, which I think was due to modifying the state of a 
> XslSortEvaluator object during the processing of a document.
> 
> I'm pretty sure the attached patch fixes the problem. At the least it 
> didn't make things worse for me.
> 
> I can commit if it's ok, though I don't know/remember how to run the 
> XSLT tests so I haven't done that. Pointers welcome.
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list



More information about the Mono-devel-list mailing list