plinq Questions

3

Solved

I've seen this code which check a condition using AsParallel() and Any() : bool IsAnyDeviceConnected() { return m_devices.Any(d => d.IsConnected); } and to make it faster : bool IsAnyDevi...
Indemonstrable asked 19/8, 2014 at 8:38

2

Solved

I'm building a simple LinQ-to-object query which I'd like to parallelize, however I'm wondering if the order of statements matter ? e.g. IList<RepeaterItem> items; var result = items .Sel...
Acidhead asked 16/2, 2011 at 9:6

2

I want to execute a query over a stream of data while processing items in parallel with a certain degree of parallelism. Normally, I'd use PLINQ for that, but my work items are not CPU bound but IO...
Reagan asked 16/1, 2014 at 18:27

1

Solved

Assume you have a LINQ query like source.AsParallel().Where(expensiveOperation).Select(cheapOperation) I suppose in this case Select also runs in parallel execution mode. Maybe it's just a chea...
Absorptance asked 23/12, 2013 at 22:35

2

Solved

Recently I made a couple of measures about Linq and Plinq. I can't see in which situation has a real significant benefit of Plinq. I've found many examples such as: Enumerable.Range(0, 10000).AsP...
Odorous asked 17/12, 2013 at 9:10

3

Solved

I have a few infinite generator methods, including some long-running and infinitely-long-running generators. IEnumerable<T> ExampleOne() { while(true) // this one blocks for a few seconds ...
Exorbitance asked 25/1, 2012 at 6:40

1

Solved

I can't seem to wrap my head around what the difference is between AsSequential and AsOrdered. I have looked up documentation on msdn for each of these as well as searching the internet for example...
Corbeil asked 3/8, 2013 at 1:43

1

Solved

I have been using PLINQ recently to perform some data handling. Basically I have about 4000 time series (so basically instances of Dictionary<DataTime,T>) which I stock in a list called time...
Disconcert asked 25/7, 2013 at 7:47

2

Here is a scenario. A gateway hosted by IIS. A request may require issuing multiple independent other requests to another service each of which may take up to several seconds. Naturally I thought i...
Szombathely asked 19/3, 2013 at 5:16

3

Solved

I have a List<Task<bool>> that I want to enumerate in parallel finding the first task to complete with a result of true and not waiting for or observe exceptions on any of the other tas...
Compost asked 6/2, 2013 at 1:42

2

Solved

One of the nice things about linq was having infinite data sources processed lazily on request. I tried parallelizing my queries, and found that lazy loading was not working. For example... class ...
Juliettajuliette asked 4/2, 2013 at 4:18

3

Solved

What is the best way way to track progress in the following long total = Products.LongCount(); long current = 0; double Progress = 0.0; Parallel.ForEach(Products, product => { try { var pr...
Hepzi asked 26/1, 2013 at 11:51

2

Many custom Enumerable extensions can be implemented in terms of other builtin operations - for example this trivial convenience method: public static bool AnyOf<TElement>(this TElement item...
Again asked 19/12, 2012 at 1:56

1

Solved

I'm running a PLINQ query as follows: ParallelQuery<string> winningCombos = from n in nextComboMaker.GetNextCombo() .AsParallel().WithCancellation(_cancelSource.Token) where ComboWasAWinne...
Carbine asked 30/10, 2012 at 2:46

1

Solved

Say, I have the following code: IPrincipal capturedPrincipal = Thread.CurrentPrincipal; myseq.AsParallel().Select(x => { Thread.CurrenctPrincipal = capturedPrincipal; /*call code protected wi...
Tunstall asked 24/10, 2012 at 11:51

1

Solved

what I'm basically doing is iterating in parallel over a sequence of letter combinations, when I get the combo I want it's considered a win. I want to get all the wins from this query (which it's d...
Welldone asked 7/10, 2012 at 1:18

1

Solved

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 ...
Iced asked 18/8, 2012 at 17:10

1

Solved

After I upgraded to DotNet 4.5, a query started giving me OutOfMemoryExceptions. The (distilled) query is: var tests = new int[]{} .AsParallel() .GroupBy(_ => _) .Take(int.MaxValue) .ToArr...
Eddings asked 16/8, 2012 at 20:48

1

Solved

I'm new to LINQ and PLINQ, and I'm building a project to test them. Stub: class Stub { private Boolean mytf; public Stub() { Random generator = new Random(); if (generator.NextDouble() < ...
Vagary asked 21/7, 2012 at 14:19

5

I hope this is not a misuse of stackoverflow; recently I've seen some great questions here on Parallel Extensions, and it got my interest piqued. My question: Are you using Parallel Extensio...
Saturate asked 18/10, 2010 at 14:42

1

Solved

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 th...
Talishatalisman asked 22/6, 2012 at 13:11

4

Solved

Say I have an IO-bound task. I'm using WithDegreeOfParallelism = 10 and WithExecution = ForceParallelism mode, but still the query only uses two threads. Why? I understand PLINQ will usually choos...
Wallack asked 28/11, 2009 at 14:40

2

How to implement MapReduce in C# using PLINQ? Suppose, you have 7-8 WebServices to collect data and on each receiving (async manner) you have to put that data into some tables of a database, in m...
Howlet asked 12/4, 2012 at 8:4

2

I wrote some basic sample code to familiarise myself with PLINQ. I came across something weird. I don't know if it's an error in my code or an error in my understanding of PLINQ. The MSDN docum...
Romola asked 6/6, 2012 at 0:10

2

Solved

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....
Growler asked 27/3, 2012 at 11:59

© 2022 - 2024 — McMap. All rights reserved.