[Mono-dev] [PATCH] System.Threading.Parallel

Marek Safar marek.safar at seznam.cz
Fri Dec 21 09:23:59 EST 2007


Hi Andreas,

It seems to me your diff is not complete as some files rely on working 
copy of files which don't exist.

I would not add this to corlib as it may cause problems later when MS 
introduces better "Parallel" library support.

Marek
>
> Attached is a patch adding the System.Threading.Parallel assembly, an 
> optional part of the ECMA-335 standard (Annex G). The initial 
> implementation is single-threaded, as permitted by the standard. All 
> my test cases pass. Please review.
>
> Am I correct to use the ecma.pub key for this ECMA-only assembly?
>
> And am I seeing correctly that the ECMA docs do not document protected 
> methods? I used "internal protected" to be on the safe side for now.
>
> There are some comments inline, documenting where I needed to 
> interpret the standard. For instance, the standard says an exception 
> should be rethrown in EndRun, which I am doing now, but this of course 
> hides the original source of the exception, so maybe we should not 
> rethrow it but throw some new exception with it as InnerException?
>
>
> To completely support the "Parallel" Library, in addition the 
> ParallelEnvironment class would need to be implemented inside corlib. 
> But with Microsoft not having supported it, relying on its presence 
> would keep users from deploying this assembly to .NET. The proposed 
> implementation therefore uses conditional sections where 
> ParallelEnvironment should theoretically be used.
>
> Adding that class to corlib might require a new icall for 
> ParallelEnvironment,RecommendedMaxThreads (to discover the number of 
> processors/cores), and if so I assume the corlib version would need to 
> be incremented?
>
> Thanks,
>
> Andreas
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> 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