views:

171

answers:

3

i have a program written in visual studio 2008 c# which uses

            System.Threading.Tasks.Paralell.For(...

now i want to run it in linux environment using mono, is it possible? if so how?

currently i have Mono Jit compiler version 2.4.2.3 , it cannot run the above program...

+1  A: 

Mono 2.4.2.3 does not support Parallel LINQ. If you're not afraid of compiling mono from sources, I'd recommend doing that.

Gonzalo
+1  A: 

As you may know Thread management is very tied and closed to the underlying OS. The Mono team has not yet completed an implement of the TPL for Linux and I have some doubt that they will be able to achieve it soon as they have to implement it to every OS they support.

In fact you get the beggining of an implementation made during the Google Summer of Code 2008 by Jeremie Laval : http://code.google.com/p/mono-soc-2008/source/browse/#svn/trunk/parallelfx

You can get more info about this implementation here : http://blog.netmedia.info/2008/07/29/c-30-and-parallel-fxlinq-in-mono/

PatriceVB
+1  A: 

You could try the PFX implmentation by Jeremie Laval for Mono, but I have found that it is subtly different than the Microsoft implementation, so there may be some porting required to get things to work correctly.

That being said, another potential possibility (untested) would be to use the new Reactive Framework for .NET 3.5sp1, and see if it works on Mono. It includes a backport of the PFX libraries, in their current API. It may work correctly on Mono (but, as I said, it's not tested or supported there).

Reed Copsey