Project Name File Name Usage Source Code Link
PexFaultLocalization ParallelBreadthFirstSearchAlgorithm.cs // enqueue roots Parallel.ForEach( roots, this.CreateLocal, (root, i, local) => this.EnqueueRoot(root, local), this.OnLocalFinalized ) Link To Source File
PexFaultLocalization ParallelBreadthFirstSearchAlgorithm.cs Parallel.ForEach( this.VisitedGraph.OutEdges(u), this.CreateLocal, (e, i, childLocal) => this.VisitChildren(e, childLocal), this.OnLocalFinalized ) Link To Source File
QuickGraph ParallelBreadthFirstSearchAlgorithm.cs // enqueue roots Parallel.ForEach( roots, this.CreateLocal, (root, i, local) => this.EnqueueRoot(root, local), this.OnLocalFinalized ) Link To Source File
QuickGraph ParallelBreadthFirstSearchAlgorithm.cs Parallel.ForEach( this.VisitedGraph.OutEdges(u), this.CreateLocal, (e, i, childLocal) => this.VisitChildren(e, childLocal), this.OnLocalFinalized ) Link To Source File
PROMPT11-07-ConcurrentProgramming.sandrapatfer FileFinderForm.cs // Parallel.ForEach(Directory.EnumerateDirectories(fldr, "*", SearchOption.AllDirectories), // (dir) => // foreach (var dir in Directory.EnumerateDirectories(fldr, "*", SearchOption.AllDirectories)) // { // if (!_canceled) // { Parallel.ForEach(Directory.EnumerateFiles(fldr, patt, SearchOption.AllDirectories), /*new ParallelOptions() { MaxDegreeOfParallelism = 16 * Environment.ProcessorCount },*/ () => 0, (fname, s, curr) => { if (!_canceled) { string content = File.ReadAllText(fname); if (content.Contains(word)) { ctx.Post((o) => { txtResults.AddLine(fname); }, null); //Interlocked.Increment(ref nFiles); return ++curr; } else { return curr; } } else { return curr; } }, (curr) => { Interlocked.Add(ref nFiles, curr); }) Link To Source File