MonoTouch advertises support AsParallelon its website with this piece of code:
from item in items.AsParallel ()
let result = DoExpensiveWork (item)
select result;
However, even a trivial pattern resets my application:
var items = new [] { 1, 2, 3 };
var twice = (
from x in items.AsParallel()
select 2 * x
).ToArray();

I know that MonoTouch cannot handle virtual generic methods, but does PLINQ not work?
What am I doing wrong?
MonoTouch version is 5.3.5.
The same goes for Parallel.ForEach:
System.AggregateException: One or more errors occured ---> System.Exception:
Attempting to JIT compile method 'System.Threading.Tasks.Parallel:<ForEach`1>m__36<int> ()' while running with --aot-only.
See http:
source
share