Skip to main content
Filter by
Sorted by
Tagged with
0 votes
1 answer
111 views

I have the following C# code : var rand = new Random(1); var range = Enumerable.Range(1, 8); var partition = Partitioner.Create(range, EnumerablePartitionerOptions.NoBuffering); foreach (var x in ...
tigrou's user avatar
  • 4,586
1 vote
2 answers
109 views

The doc listed the operators in the table that ToArray should be unordered when the parallelquery source is unordered. However, the result turned out to be always ordered when force evaluated to array ...
jamgoo's user avatar
  • 107
-1 votes
1 answer
220 views

I have an asynchronous async static public Task<int> Test(int x, int y) { await Task.Delay(1000); return x; } And I try to run it in parallele on a list. I did like that: var x = new[] { ...
Nicolas REY's user avatar
4 votes
0 answers
143 views

Run the following code: using System; using static System.Console; var numbers = Enumerable.Range(0, 31); WriteLine("\nNumbers divisible by 5 are(using LINQ):"); numbers .Where(num => ...
Vaskaran Sarcar's user avatar
0 votes
0 answers
70 views

Need your help to understand how can we log ETW events to track Task started & Task completed inside parallel.foreach. I basically need to see when event got fired. I have gone through few ...
Sks's user avatar
  • 610
2 votes
3 answers
376 views

I wrote a PLINQ query that ends with the ForAll operator, and I used the WithCancellation operator in order to cancel the query midway. Surprisingly the query is not canceled. Here is a minimal ...
Theodor Zoulias's user avatar
1 vote
1 answer
221 views

I have a self-referenced table like below. key parent Description A NULL B A C B D C And initially having 1 Key value. Using this key value, I need to find all the child nodes recursively and update ...
Yashas's user avatar
  • 31
2 votes
2 answers
396 views

I wrote a piece of testing code using AsParallel to concurrently read big files. It causes memory leak. It seems GC doesn’t recycle the unused objects as expected. Please see the code snippet. ...
Frank Feng's user avatar
0 votes
0 answers
32 views

I have some LINQ code that under some conditions, which I can test for, benefits from parallelization. I would like to use PLINQ when such conditions apply, but also avoid to have all the processing ...
rzippo's user avatar
  • 1,079
0 votes
0 answers
135 views

I want to divide a IQueryable into several ones, like the image below, extracted from the explanation of the .AsParallel(). But instead of running all in parallel, I want to run some of them together, ...
Júlio Almeida's user avatar
0 votes
1 answer
69 views

I have a list of 3D X/Y/Z points, foundPoints and single 3D X/Y/Z point, rayOrigin. I'm looking to return the point from the list that is farthest from rayOrigin. It is likely that the list could ...
Alex's user avatar
  • 1
3 votes
2 answers
199 views

Given a list of IP addresses: List<string> ipList = new List<string>(); //example: 192.168.0.1, 192.168.0.2, 192.168.0.3 etc. I am attempting to loop over each IP in the list, in a ...
BernardV's user avatar
  • 766
1 vote
1 answer
1k views

I've got a loop that needs to be run in parallel as each iteration is slow and processor intensive but I also need to call an async method as part of each iteration in the loop. I've seen questions on ...
Mog0's user avatar
  • 2,239
1 vote
2 answers
1k views

I have a very large collection that implements the generic IList<T> interface and contains tens of millions of elements, and I would like to process them in parallel using PLINQ. I noticed that ...
Theodor Zoulias's user avatar
2 votes
1 answer
1k views

I am beginner in C# , .Net core. So, I do have very limited knowledge over this advance topics (Task parallel library, PLINQ or Concurrent Collections). If my question seemed like idiotic, then I am ...
SP Sarkar's user avatar
  • 128
1 vote
1 answer
2k views

Why do I get an overflow exception even if I apply the unchecked operator on an expression? return GetCharStream().AsParallel().Aggregate<char, int[], int[]>(() => new int[26], (ca, c) =&...
teenup's user avatar
  • 7,725
1 vote
0 answers
1k views

Any official or stable 3rd party library that supports using AsParallel over an IAsyncEnumerable<T> (.NET Standard 2.1) ? I don't want to wrap an IAsyncEnumerable<T> to an IEnumerable<...
Alsein's user avatar
  • 4,856
1 vote
1 answer
686 views

I was going through PLINQ in one of the books and it said: If you have a complex query that can benefit from parallel processing but also has some parts that should be done sequentially, you can ...
mfs's user avatar
  • 4,104
0 votes
0 answers
18 views

I'm new with LINQ and I try to make a statement like this where I have a variable called status and takes a different value but how can I do this because I have this error Error CS0029 Cannot ...
user avatar
0 votes
1 answer
434 views

Can someone explain for me why PLinq is better than normal linq in first example but worst in the second? I see the only difference is Thread.Sleep() at ExpensiveComputation() function using System; ...
David Nguyen's user avatar
0 votes
1 answer
121 views

Using IronPython, I am calling some function in parallel that is within the same function the parallelized data is in to keep it in the same scope. In multiprocessing of CPython it is pretty clear ...
user-2147482637's user avatar
0 votes
0 answers
234 views

In the intro to PLINQ, the docs seem to show two different ways of getting data back from a process unordered. In one case, AsParallel can be used with Unsorted and the Select or SelectMany method. ...
user-2147482637's user avatar
1 vote
2 answers
514 views

I've created an application that reads properties from files using the Windows-API-Code-Pack from this package. I'm having an issue when retrieving properties var width = fileInfo.Properties....
Aze's user avatar
  • 104
0 votes
2 answers
295 views

I am searching in parallel using LINQ to find pattern matching files. public class ParallelLinq { public IList<string> SearchFolders = new List<string> { @"C:\Windows" //...
RaceBase's user avatar
  • 19k
1 vote
1 answer
208 views

I am trying to use Linq (and eventually parallel Linq) calculate the top N ballots in a Ranked Choice Vote / Alternative Vote I'm using the following code to generate several ballots with a ...
TLDR's user avatar
  • 1,288

1
2 3 4 5
8