tagged [parallel-processing]
what is the relation between Asynchronous and parallel programming in c#?
what is the relation between Asynchronous and parallel programming in c#? I am getting confused as asynchronous programming is a way to execute a block of code asynchronously, that calls a method and ...
- Modified
- 15 Sep at 04:16
Parallel Sort Algorithm
Parallel Sort Algorithm I'm looking for a simple implementation of a parallelized (multi-threaded) sort algorithm in C# that can operate on `List` or Arrays, and possibly using Parallel Extensions but...
- Modified
- 11 May at 12:24
Wait for QueueUserWorkItem to Complete
Wait for QueueUserWorkItem to Complete If I add jobs to the thread pool with `QueueUserWorkItem`... how do I keep my program from going forward until all jobs are completed? I know I could add some lo...
- Modified
- 2 Aug at 01:13
Is it possible to change parallelOptions.MaxDegreeOfParallelism during execution of a Parallel.ForEach?
Is it possible to change parallelOptions.MaxDegreeOfParallelism during execution of a Parallel.ForEach? I am running a multi-threaded loop: I want to change the `parallelOptions.MaxDegreeOfParallelism
- Modified
- 15 Mar at 19:25
Parallel.ForEach loop with BlockingCollection.GetConsumableEnumerable
Parallel.ForEach loop with BlockingCollection.GetConsumableEnumerable Why `Parallel.ForEach` loop exits with `OperationCancelledException`, while using `GetConsumableEnumerable`? ``` //outside the fun...
- Modified
- 2 Jun at 11:2
Parallel.ForEach() vs. foreach(IEnumerable<T>.AsParallel())
Parallel.ForEach() vs. foreach(IEnumerable.AsParallel()) Erg, I'm trying to find these two methods in the BCL using Reflector, but can't locate them. What's the difference between these two snippets? ...
- Modified
- 1 Aug at 18:25
Why isn't Parallel.ForEach running multiple threads?
Why isn't Parallel.ForEach running multiple threads? Today i tried do some optimization to `foreach` statement, that works on `XDocument`. Before optimization: After optimization: I saw that .
- Modified
- 10 Nov at 15:9
Simplest way to run three methods in parallel in C#
Simplest way to run three methods in parallel in C# I have three methods that I call to do some number crunching that are as follows Each of the functions is independent of each other and can be compu...
- Modified
- 1 Apr at 13:35
AsParallel.ForAll vs Parallel.ForEach
AsParallel.ForAll vs Parallel.ForEach Is there any difference between the below code snippets. If so, what? `myList.AsParallel().ForAll(i => { /*DO SOMETHING*/ });` and `Parallel.ForEach(mylist, i => ...
- Modified
- 30 Apr at 00:31
Task.WhenAll result ordering
Task.WhenAll result ordering I understand from [here](http://msdn.microsoft.com/en-us/library/hh556530.aspx) that the task execution order for `Task.Whenall` is not deterministic but I cannot find any...
- Modified
- 20 Sep at 12:39
Track progress when using Parallel.ForEach
Track progress when using Parallel.ForEach I am refactoring my program to use Parallel.ForEach. Before, when I was using a regular for loop, I was updating a WPF progress bar using Dispatcher, display...
- Modified
- 6 Oct at 01:29
Under what conditions can TryDequeue and similar System.Collections.Concurrent collection methods fail
Under what conditions can TryDequeue and similar System.Collections.Concurrent collection methods fail I have recently noticed that inside the collection objects contained in [System.Collections.Concu...
- Modified
- 13 Apr at 06:40
How expensive is the lock statement?
How expensive is the lock statement? I've been experimenting with multi threading and parallel processing and I needed a counter to do some basic counting and statistic analysis of the speed of the pr...
- Modified
- 12 Jan at 20:20
Break parallel.foreach?
Break parallel.foreach? [parallel.for](http://msdn.microsoft.com/en-us/library/system.threading.tasks.parallel.for.aspx) I have a pretty complex statement which looks like the following: ``` Parallel....
- Modified
- 3 Dec at 19:47
Check if task is already running before starting new
Check if task is already running before starting new There is a process which is executed in a task. I do not want more than one of these to execute simultaneously. Is this the correct way to check to...
- Modified
- 5 Oct at 11:39
Unit Testing, Deadlocks, and Race Conditions
Unit Testing, Deadlocks, and Race Conditions Any suggestions on how to write repeatable unit tests for code that may be susceptible to deadlocks and race conditions? Right now I'm leaning towards skip...
- Modified
- 6 Oct at 23:39
How to wait for a number of threads to complete?
How to wait for a number of threads to complete? What is a way to simply wait for all threaded process to finish? For example, let's say I have: ``` public class DoSomethingInAThread implements Runnab...
- Modified
- 1 Apr at 00:43
What is the difference between concurrent programming and parallel programming?
What is the difference between concurrent programming and parallel programming? What is the difference between concurrent programming and parallel programing? I asked google but didn't find anything t...
- Modified
- 17 Dec at 09:52
Are the ParallelExtensions "Extras" still of value?
Are the ParallelExtensions "Extras" still of value? The [Task Parallels Extras extension](http://blogs.msdn.com/b/pfxteam/archive/2010/04/04/9990342.aspx) was published in 2010, and since then no upda...
- Modified
- 28 May at 00:44
How to configure a maximum number of threads in a Parallel.For
How to configure a maximum number of threads in a Parallel.For This is the example microsoft presents for the parallel for, and I'd like to know how configure a maximum number of threads for this code...
- Modified
- 10 Apr at 16:51
Optimal number of threads per core
Optimal number of threads per core Let's say I have a 4-core CPU, and I want to run some process in the minimum amount of time. The process is ideally parallelizable, so I can run chunks of it on an i...
- Modified
- 20 Jul at 18:46
Observing Task exceptions within a ContinueWith
Observing Task exceptions within a ContinueWith There are various ways in which to observe exceptions thrown within tasks. One of them is in a ContinueWith with OnlyOnFaulted: ``` var task = Task.Fact...
- Modified
- 31 Jul at 15:34
Nested Parallel.ForEach Loops on the same list?
Nested Parallel.ForEach Loops on the same list? I need to parallelize a method that does an exhaustive pairwise comparison on elements in a list. The serial implementation is straight-forward: In this...
- Modified
- 19 Jul at 13:46
Parallel.For(): Update variable outside of loop
Parallel.For(): Update variable outside of loop I'm just looking in to the new .NET 4.0 features. With that, I'm attempting a simple calculation using `Parallel.For` and a normal `for(x;x;x)` loop. H...
- Modified
- 6 May at 12:5
What's the best way to update an ObservableCollection from another thread?
What's the best way to update an ObservableCollection from another thread? I am using the `BackgroundWorker` to update an `ObservableCollection` but it gives this error: > "This type of `CollectionVie...
- Modified
- 29 Mar at 23:56