[Mono-dev] [PATCH] System.Threading.Parallel
Andreas Färber
andreas.faerber at web.de
Thu Dec 13 17:34:42 EST 2007
Hello,
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: System.Threading.Parallel.diff
Type: application/octet-stream
Size: 30011 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20071213/df43cdbe/attachment.obj
-------------- next part --------------
More information about the Mono-devel-list
mailing list