[Mono-list] Parallel.ForEach & MaxDegreeOfParallelism

Stifu stifu at free.fr
Thu Nov 22 20:00:57 UTC 2012


You're aware we're not supposed to look into the .NET code, because then that
prevents us from contributing to Mono, yes?
Because of you, I guess I cannot contribute to Mono anymore. :p


Karol wrote
> ok i found solution to this problem
> 
> after digging a little with ILSpy i found out that there is difference in
> implementation of TaskScheduler.MaximumConcurrencyLevel between MS.NET and
> Mono:
> 
> MS.NET :
> public virtual int MaximumConcurrencyLevel
> {
> 	get
> 	{
> 		return 2147483647;
> 	}
> }
> 
> 
> MONO:
> public virtual int MaximumConcurrencyLevel
> {
> 	get
> 	{
> 	             return Environment.ProcessorCount;
> 	}
> }
> 
> 
> (this difference was making my app work like 10 times slower on Mono than
> it was on MS.NET)
> 
> i dont know if this should be considered a bug ?
> i think portability of .NET code between windows and other OS'es should be
> threated as main feature of Mono





--
View this message in context: http://mono.1490590.n4.nabble.com/Parallel-ForEach-MaxDegreeOfParallelism-tp4657494p4657496.html
Sent from the Mono - General mailing list archive at Nabble.com.


More information about the Mono-list mailing list