[Mono-dev] Patch: XSLT thread safety

Atsushi Eno atsushi at ximian.com
Mon Jul 14 10:12:40 EDT 2008

No. Because sorting could happen a lot.

Also, your patch brings wrong assumption that every XslTransform
must be immutable, even when msxsl:script is involved (and I don't
think we welcome "x is thread safe" "y is not" sort of complication).

You are anyways standing on wrong premise anyways. Create multiple
XslTransform for each thread. Since newobj happens a lot, it shouldn't
be a big problem (for you at least).

Atsushi Eno

Joshua Tauberer wrote:
> Atsushi Eno wrote:
>> 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.
> Can't the benefits outweigh the costs? There are plenty of newobj's 
> throughout XSLT. One more isn't going to change much, and as far as I've 
> found it's the only thing preventing XSLT from being thread safe, which 
> is a big plus (for me at least).

More information about the Mono-devel-list mailing list