[Mono-list] Parallel.ForEach & MaxDegreeOfParallelism

Karol karol.gwaj at skillpages.com
Thu Nov 22 15:27:11 UTC 2012


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-tp4657494p4657495.html
Sent from the Mono - General mailing list archive at Nabble.com.


More information about the Mono-list mailing list