Questions tagged [plinq]

PLINQ is a parallel query execution engine for LINQ. PLINQ supports the data parallelism pattern by adding additional syntax to allow queries to be declared as running in parallel.

PLINQ is a parallel query execution engine for . PLINQ supports the data parallelism pattern by adding additional syntax to allow queries to be declared as running in parallel.

Related Links

365 questions
8
votes
2 answers

Boost math (ibeta_inv function) not thread safe?

I have compiled part of boost - the ibeta_inv function - into a .Net 64 bit assembly and it worked great until I started calling it from multiple threads. Then it occationally return wrong results. I complied it using this code (C++/CLI): //…
Dan Byström
  • 9,067
  • 5
  • 38
  • 68
8
votes
3 answers

Does the thread identity get transferred when using PLINQ Extensions?

I am using .AsParallel().ForAll() to enumerate a collection in parallel in the context of an ASP.NET request. The enumeration method relies on System.Threading.Thread.CurrentPrincipal. Can I rely on the individual threads used to have their…
Joe Enzminger
  • 11,110
  • 3
  • 50
  • 75
8
votes
3 answers

Plinq statement gets deadlocked inside static constructor

I came across this situation where the following plinq statement inside static constructor gets deadlocked: static void Main(string[] args) { new Blah(); } class Blah { static Blah() { Enumerable.Range(1, 10000) …
Boris Lipschitz
  • 9,236
  • 5
  • 53
  • 63
8
votes
3 answers

How exactly does AsParallel work?

It doesn't seem to do squat for the following test program. Is this because I'm testing with a small list? static void Main(string[] args) { List list = 0.UpTo(4); Test(list.AsParallel()); Test(list); } private static void…
ripper234
  • 222,824
  • 274
  • 634
  • 905
8
votes
1 answer

Why does my Parallel.ForAll call end up using a single thread?

I have been using PLINQ recently to perform some data handling. Basically I have about 4000 time series (so basically instances of Dictionary) which I stock in a list called timeSeries. To perform my operation, I simply…
SRKX
  • 1,806
  • 1
  • 21
  • 42
8
votes
4 answers

Non-linear scaling of .NET operations on multi-core machine

I've encountered a strange behavior in a .NET application that performs some highly parallel processing on a set of in-memory data. When run on a multi-core processor (IntelCore2 Quad Q6600 2.4GHz) it exhibits non-linear scaling as multiple threads…
LBushkin
  • 129,300
  • 32
  • 216
  • 265
8
votes
1 answer

Plinq, Cores and WithDegreeOfParallelism?

AS far as I understood , Plinq decides how many thread to open ( each on a thread on different core) by cores count. __________ Core 1 Core 2 Core 3 Core 4 ___________ So If I Have a Plinq task which finds all the first 1000 prime numbers…
Royi Namir
  • 144,742
  • 138
  • 468
  • 792
8
votes
1 answer

How do I write a thread-aware extension function for PLINQ?

Does anybody know how to write an extension function returning a ParallelQuery in PLINQ? More specifically, I have the following problem: I want to perform a transformation within a PLINQ query that needs an engine, whose creation is costly and…
JohnB
  • 13,315
  • 4
  • 38
  • 65
7
votes
3 answers

Equivalent of do() while{} in Parallel

How can I create the parallel equivalent of a do-while or similar in the Update() method below? Another thread in the app writes to TestBuffer at random. TestBuffer.RemoveItemAndDoSomethingWithIt(); should run until the TestBuffer is empty.…
Canacourse
  • 1,805
  • 2
  • 20
  • 37
7
votes
3 answers

PLINQ AsParallel() with lower priority?

is it possible to run some of my PLINQ AsParallel() - Queries with a lower priority than others? (Or some with a higher priority than others) Is this possible with PLinq or will I have to avoid PLINQ and do all the stuff on my…
Chris
  • 4,325
  • 11
  • 51
  • 70
7
votes
2 answers

Is PLinq Inherently Faster than System.Threading.Tasks.Parallel.ForEach

Summary: I changed from System.Threading.Tasks.Parallel.ForEach and Concurrent Data structure to a simple plinq (Parallel Linq) query. The speed up was amazing. So is plinq inherently faster than Parallel.ForEach? Or is it specific to the…
Chris Weber
  • 5,555
  • 8
  • 44
  • 52
7
votes
1 answer

Max tasks in TPL?

I want to use TPL in Worker process on Windows Azure. I'm looking to add an IJob the queue, this has a Run method, so the worker will consist of: loop get item off queue Use TPL to call IJob.Run, this is an async call But I'm a bit concerned…
Ash
  • 754
  • 1
  • 10
  • 18
7
votes
1 answer

does PLINQ preserve the original order in a sequence?

Is PLINQ guaranteed to return query results in the order of the original sequence being operated on, even if results are produced in parallel? For instance: new List(){"a", "b", "c", "d"}.asParallel().Select(str => str +…
tbischel
  • 6,337
  • 11
  • 51
  • 73
7
votes
2 answers

How to Use Effeciently Where Clause or Select in LINQ Parallel in Large Dataset

I'm having approx 250,000 records as marked as Boss, each Boss has 2 to 10 Staff. Daily I need to get the details of the Staff. Approx there are 1,000,000 staff. I'm using Linq to get the Unique list of Staff who are worked in daily basis. Consider…
B.Balamanigandan
  • 4,713
  • 11
  • 68
  • 130
7
votes
3 answers

What's the next big thing after LINQ?

I started using LINQ (Language Integrated Query) when it was still in beta, more specifically Microsoft .NET LINQ Preview (May 2006). Almost 4 years have passed and here we are using LINQ in a lot of projects for the most diverse tasks. I even wrote…
Leniel Maccaferri
  • 100,159
  • 46
  • 371
  • 480
1 2
3
24 25