plinq

Where can I get PLinq for VS 2008?

Since it's integration to the framework, the package seems to have been removed from the web. can someone point me to a download site where i can download it and use it with my .net 3.5 application? ...

Plinq gives different results from Linq - what am I doing wrong?

Can anyone tell me what the correct Plinq code is for this? I'm adding up the square root of the absolute value of the sine of each element fo a double array, but the Plinq is giving me the wrong result. Output from this program is: Linq aggregate = 75.8310477905274 (correct) Plinq aggregate = 38.0263653589291 (about half what it shou...

F# and PLINQ extension methods

While digging deeper into the latest release of F# I tried to have it interacting with PLINQ. I've noticed, however, that the two don't play very nice together code-wise. In fact it didn't seem possible to write code such as the following: open System.Linq let someArray = [|"abc"; "def"|] someArray.AsParallel().Count(new Func<_,_>(fun ...

Inconsistent results when executing and spawning child tasks

I have some simple code in which the main Thread is creating a new Task. The task in turn spawns multiple child tasks. The main Thread does a 'wait' on the parent Task. I'm observing that I don't get the same output across multiple runs of the program. In the code below I'm printing out the value of the iteration variable in each task bu...

Using PLINQ to speed-up calls to external services

Possible Duplicate: Parallel Linq - Use more threads than processors (for non-CPU bound tasks) Hello. I wondering how to use PLINQ to speed-up crawling of web-pages. I have a list of objects that is should be posted to web page. Doing it in one thread is a bit slowly. I have tried to enroll processing loop using PLINQ's Parall...

PLINQ problem / techniques to impliment multi-threaded, lock-free lists (in C#).

Here's the code in question: parentNodes.AsParallel().ForAll(parent => { List<Piece> plist = parent.Field.GetValidOrientations(pieceQueue[parent.Level]); plist.ForEach(p => { TreeNode child = new TreeNode(p, parent); var sco...

How can I prevent AppDomainUnloadedException after NUnit tests PLINQ code?

How can I diagnose and minimize or prevent AppDomainUnloadedException? NUnit 2.5.2 consistently throws AppDomainUnloadedException after long (>10s) tests involving PLINQ. Back in July 2008, Stephen Toub said: Yes, the scheduler in the CTP doesn't handle thread aborts very well, which frequently causes the process to crash when...

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 are kicked off to process the data. When run as a non-multithreaded loop on a single cor...

Keeping a file index in memory, compression?

I'm doing a file-search utility that indexes a drive and let you find a file based on different criteria. To make it as fast as possible I'd want to keep the index in memory (which also allows me to do some PLINQ). In order to keep the memory requirement down I'm thinking of putting all directory names into a lookup table (with a point...

Issues with de serializating PLINQO objects in C#

I have tried many ways to deserialize LINQO objects but every method failed. Here is an example of the last code. System.Text.ASCIIEncoding encoding = new System.Text.ASCIIEncoding(); DataContractJsonSerializer ser = new DataContractJsonSerializer(typeof(SalesNetData.Country)); string xmlData = Session["CCC"].To...

What's exactly PLinq?

What is PLinq? And what is the difference between this and the normal Linq? I saw this word many times, so I googled it and found that it is a new .NET Framework 4 feature, but I didn't really understand what it is... Thanks. ...

How to make PLINQ to spawn more concurrent threads in .NET 4.0 beta 2?

In former versions of Parallel Extensions you could set the number of threads: enumerable.AsParallel(numberOfThreads) But now that overload is not available anymore. How to do it now? ...

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<int> list = 0.UpTo(4); Test(list.AsParallel()); Test(list); } private static void Test(IEnumerable<int> input) { var timer = new Stopwatch(); timer.Start(); var size ...

Why does PLINQ uses only two threads?

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 choose a degree of parallelism equal to my core count, but why does it ignore my specific request for higher parallelism? static void Main(string[...

Read only Search function. Stored Procedures or IQueryable with POCOs and Ef 4.0

We have some search functionality that can return tens of thousands of results from the db although it will only fetch the rows needed to be displayed into e.g. first 10 records. When the next page is requested, we hit the db again. It searches our database based on a set of variables and this search can then be refined which will resul...

Reactive Framework vs PLINQ vs Task Parallel Library vs Parallel Extensions

In a few words, can anyone set the record straight what is what? Does this all end up in .NET 4.0 ? ...

Does Parallel.ForEach require AsParallel()

ParallelEnumerable has a static member AsParallel. If I have an IEnumerable<T> and want to use Parallel.ForEach does that imply that I should always be using AsParallel? e.g. Are both of these correct (everything else being equal)? without AsParallel: List<string> list = new List<string>(); Parallel.ForEach<string>(GetFileList().Where...

returning null with PLINQ

i have an extension method for IEnumerable which then iterates through the collection, doing its business, and then returns an new IEnumerable. I have tried to use PLINQ using .AsParallel().ForAll() which speeds up the iterations significantly (which of course it should do) however when the collection is returned, there are often a few ...

How do you pronouce PLINQ

Today in my office there was a question of how to say PLINQ as in "P LINQ" or "plinq" all one word. Does anyone have a definitive answer? ...

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 my final college project based on LINQ. You see how I like it. LINQ and more recently P...