public static void ForAll <TSource>(this ParallelQuery <TSource> source, Action <TSource> action) { var all = source.AsEnumerable().Select( x => { //return Task.Factory.StartNew( // delegate // { // // does the scope sharing capture x and action? // } //); action(x); return(default(object)); } ).ToArray(); }