Questions tagged [parallel-extensions]

Parallel Extensions is a managed concurrency library included in the .NET 4.0 release.

Parallel Extensions is a managed concurrency library included in the .NET 4.0 release. It is composed of two parts: Parallel LINQ (PLINQ) and Task Parallel Library (TPL).

124 questions
1
vote
1 answer

Reasons for Parallel Extensions working slowly

I am trying to make my calculating application faster by using Parallel Extensions. I am new in it, so I have just replaced the main foreach loop with Parallel.ForEach. But calculating became more slow. What can be common reasons for decreasing…
darja
  • 4,985
  • 9
  • 33
  • 47
1
vote
3 answers

Passing values with Parallel Extensions and VB.net

I am looking for an example of how to do the following in VB.net with Parallel Extensions. Dim T As Thread = New Thread(AddressOf functiontodowork) T1.Start(InputValueforWork) Where I'm getting stuck is on how to pass into the task my parameter…
Middletone
  • 4,190
  • 12
  • 53
  • 74
1
vote
1 answer

Partitioning in TPL using Partitioner

I am seeing a small performance difference between the following two functionally similar code, I hope someone will be able to help me understand why is there a difference. //Case 1 Faster Parallel.ForEach(data, x => func(x)) //Case 2…
v1p3r
  • 677
  • 7
  • 13
1
vote
1 answer

How to efficiently parallelize LINQ Except method

I was wondering how this could be achieved in the most efficient way. Should I use a.RemoveAll(x => b.AsParallel().Any(y => y == x)); or a.AsParallel().Except(b.AsParallel()); or something else? Can anyone explain what the underlying difference…
Igor Ševo
  • 5,459
  • 3
  • 35
  • 80
1
vote
1 answer

Multi-threading access to SubmitChanges() (LINQ to SQL)

I am using Visual Studio 2010 Beta 2. In Parallel.For loop I execute the same method with different parameter values. After execution processed data must be stored in the database. But I've got an exception hat says that I could not work with the…
sashaeve
  • 9,387
  • 10
  • 48
  • 61
1
vote
1 answer

Is there an F# equivalent to the TPL Parallel.Invoke?

Is there an F# equivalent to the TPL Parallel.Invoke? So far, all i have come across is task factory for explicit task control but i am having problems profiling it.
Stuart Gordon
  • 185
  • 2
  • 10
1
vote
0 answers

What scenarios would NativeOverlapped or System.Threading.Overlapped be useful in PFX IOTaskScheduler?

I'm looking at the PFX team's Parallel Extensions Extras DLL and see an IOTaskScheduler that uses NativeOverlapped, and System.Threading.Overlapped methods. Since there isn't much documentation on when each extension is useful, it is up to me to…
makerofthings7
  • 60,103
  • 53
  • 215
  • 448
1
vote
0 answers

Process a list of webrequest items in parallel as fast as possible

I have a batch of urls that I want to fetch. The list contains urls (more then 50.000) with different domainnames but all domains use the same load balanced server ip. For each url I want to log its result code, its fetch duration and the hash of…
1
vote
1 answer

Will using Parallel.ForEach in ASP.NET prevent other threads from processing requests?

I'm looking at using some PLINQ in an ASP.NET application to increase throughput on some I/O bound and computationally bound processing we have (e.g., iterating a collection to use for web service calls and calculating some geo-coordinate…
Brandon Linton
  • 4,373
  • 5
  • 42
  • 63
1
vote
2 answers

Parallel.ForEach changes behavior with more than one thread

I have an array of files that are having write operations performed on them, I'm using a Parallel.ForEach loop to speed this up. The problem is that when I have more than one thread, it behaves erratically. The program makes 10 writes of 250000…
0_______0
  • 547
  • 3
  • 11
1
vote
1 answer

Parallel execution of datarow comparison using custom comparison class

I'm implementing a "reconciliation" library which will allow to perform diffs between different data objects. As part of the implementation, I'm converting the objects to compare (mostly CSV files) to datatables and doing a specific steps of…
0
votes
1 answer

Problems with extracting a method because of parallelism

I would like to extract following code into a new method: ... Parallel.For(0, Environment.ProcessorCount, i => { handTypeSum[i] = new PSTLooper(intHands).EvalEnumeration(i); }); ... PSTLooper is of type IEvaluator and I have several other…
Sven
  • 2,839
  • 7
  • 33
  • 53
0
votes
2 answers

Exception not being caught

I have a very simple application, we feed it a list of our websites, and it does a parallel foreach on them and inside each action it does an http post to it. Similar to below: static int success = 0 static void Main(string[] args) { try { …
Jeremy Boyd
  • 5,245
  • 7
  • 33
  • 57
0
votes
2 answers

Do LINQ Operators block at all?

I'm looking at the output from VS2010 Concurrency Profiler and I notice that I'm getting some thread contentions around some of the LINQ operators. Here is the statement causing the contention: m_dictionary.PermutableSubunits.Select(subunit =>…
0
votes
5 answers

Java Parallel Programming

I need to parallelize a CPU intensive Java application on my multicore desktop but I am not so comfortable with threads programming. I looked at Scala but this would imply learning a new language which is really time consuming. I also looked at…
1 2 3
8 9