plinq Questions
4
Solved
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?
A:
IEnumerable<string> items = ...
Parallel.F...
Mason asked 24/9, 2010 at 18:45
2
Solved
I would like to process some items in parallel. This processing is independent (order does not matter) and returns an output. These outputs should then be relayed back in order as quickly as possib...
Gleeman asked 3/9, 2018 at 13:15
2
Solved
I observed a weird behavior while experimenting with a PLINQ query. Here is the scenario:
There is a source IEnumerable<int> sequence that contains the two items 1 and 2.
A Parallel LINQ Sel...
Labe asked 30/11, 2022 at 6:48
3
Solved
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 PLI...
2
Solved
In which scenarios Will Range partitioning will be better choice than Chunk partitioning ? (and vise verse)
I already know that
Chunk partitioning : grabbing smal chunks of elements from the in...
Unmoving asked 1/9, 2012 at 15:27
1
Solved
In the following code, if you uncomment the "using static" line, the query will not run in parallel. Why?
(Visual Studio Community 2019, .Net Core 3.1 / .Net 4.8)
using System;
using Syst...
7
Solved
The class CancellationTokenSource is disposable. A quick look in Reflector proves usage of KernelEvent, a (very likely) unmanaged resource.
Since CancellationTokenSource has no finalizer, if we do ...
Argilliferous asked 5/8, 2011 at 17:51
6
Solved
The msdn documentation about order preservation in PLINQ states the following about ForAll().
Result when the source sequence is ordered: Executes nondeterministically in parallel
Result when the...
5
What is the difference between these two?
What is the best way to compare ?
It is always better plinq ?
When we use plinq ?
3
Solved
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(...
Enamor asked 13/9, 2011 at 10:8
2
I would like to report progress from a long running PLINQ query.
I can't really find any native LINQ method that allows me to do this (as was implemented for cancellation).
I have read this arti...
Episcopate asked 9/4, 2019 at 2:2
2
Solved
The question
In a LINQ query I can correctly (as in: the compiler won't complain) call .AsParallel() like this:
(from l in list.AsParallel() where <some_clause> select l).ToList();
or lik...
Gout asked 23/10, 2016 at 16:54
2
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 li...
1
Solved
I'm trying to combine my PLINQ statement like this:
Enumerable.Range(0, _sortedList.Count()).AsParallel().WithDegreeOfParallelism(10)
.Select(i => GetTransactionDetails(_sortedList[i].Transact...
Speculate asked 13/12, 2016 at 16:44
3
Solved
So topic is the questions.
I get that method AsParallel returns wrapper ParallelQuery<TSource> that uses the same LINQ keywords, but from System.Linq.ParallelEnumerable instead of System.Li...
Cityscape asked 22/8, 2013 at 12:59
9
Solved
Amazingly, using PLINQ did not yield benefits on a small test case I created; in fact, it was even worse than usual LINQ.
Here's the test code:
int repeatedCount = 10000000;
private void button...
2
Solved
So, I've got a very weird situation here where it seems a forAll() plinq-query removes some of my custom objects and, to be honest, I have no clue why.
var myArticles = data.FilterCustomerArticles...
3
Solved
While using Parallel.ForEach we have the option to define the Parallel options and set the Max Degree of Parallelism like :
Parallel.ForEach(values, new ParallelOptions {MaxDegreeOfParallelism = n...
Ivanaivanah asked 13/8, 2014 at 15:36
1
Solved
For the life of me, I can't figure out why all the foos are not null.
I'm assuming the .ForAll() should be executing before I call the .All() method, but it's not?
public class Foo
{
public stri...
2
Solved
I am looking at this code
var numbers = Enumerable.Range(0, 20);
var parallelResult = numbers.AsParallel().AsOrdered()
.Where(i => i % 2 == 0).AsSequential();
foreach (int i in parallelResult...
Rayner asked 9/10, 2013 at 7:27
3
Solved
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 ...
Calculating asked 29/11, 2011 at 23:53
2
Solved
I'm still very new to LINQ and PLINQ. I generally just use loops and List.BinarySearch in a lot of cases, but I'm trying to get out of that mindset where I can.
public class Staff
{
// ...
publi...
2
Solved
In our company there are thousands(!) of cars. each car has a GPS device which sends periodically (cycle) its location.
So each Cycle contains :
List<Cars> ( cars that sent location – corres...
2
Solved
I have code like this:
var list = new List<int> {1, 2, 3, 4, 5};
var result = from x in list.AsParallel()
let a = LongRunningCalc1(x)
let b = LongRunningCalc2(x)
select new {a, b};
Let...
1
Solved
I have the following PLINQ query:
// Let's get a few customers
List<Customer> customers = CustomerRepository.GetSomeCustomers();
// Let's get all of the items for all of these customers
Lis...
Concerted asked 6/10, 2014 at 6:23
1 Next >
© 2022 - 2024 — McMap. All rights reserved.