[Mono-dev] Patch: XSLT thread safety

Andreas Färber andreas.faerber at web.de
Thu Jul 17 11:52:13 EDT 2008


Am 17.07.2008 um 16:42 schrieb Atsushi Eno:

> Joshua Tauberer wrote:
>>> If MSDN says it is thread safe for transformation, then that is  
>>> wrong.
>>> If it were correct, it requires whatever no one can achieve.
>>
>> Not to go all semantics on you, but an API can't be wrong.  
>> Inconsistent,
>
> What I said wrong here is MSDN documentation, not API (and yes as you
> say, I don't think differentiating them here is very productive).
>
>> yes. But if it's inconsistent, that doesn't tell you which way to
>> resolve the inconsistency. It seems perfectly sensible to resolve the
>> inconsistency by saying "so long as any scripts and extension  
>> functions
>> are also thread safe".
>
> So it falls back to my second reply: I don't think we welcome "x is
> thread safe" "y is not" sort of complication. (And I don't forget
> the performance issue in your change yet.)

If I got you correct, then msxsl:script is the only problem with  
thread safety? Since it's a Microsoft extension I don't think many  
stylesheets use it, and those that do "should" be aware of concurrency  
issues. It's a relatively common pattern in J2EE to preload a  
stylesheet and to have a servlet's request workers do the transform  
asynchronously, relying on thread safety. Therefore interpreting the  
MSDN docs in the way proposed by Joshua would make sense, and I don't  
think we even have to spell out the "unless you do something stupid"  
part for that.

Performance is a different matter of course.

Andreas



More information about the Mono-devel-list mailing list