task-parallel-library

What is the difference between TPL dataflow and Akka.net?

馋奶兔 提交于 2020-08-04 03:25:21
问题 I have worked with TPL dataflow. Really liked it. I had heard the term Akka many times from my java/scala friends so I tried to read about it and found out that akka has a .net port too. Great. When I continued reading about what akka is, I was surprised to see that it sounds exactly like TPL dataflow. So coming to my question, what is the difference between TPL dataflow and Akka.net ? When to chose what ? 回答1: Akka is an actor based model, and so is TPL Dataflow. As the latter is described

TPL Dataflow block consumes all available memory

我与影子孤独终老i 提交于 2020-07-28 03:16:08
问题 I have a TransformManyBlock with the following design: Input: Path to a file Output: IEnumerable of the file's contents, one line at a time I am running this block on a huge file (61GB), which is too large to fit into RAM. In order to avoid unbounded memory growth, I have set BoundedCapacity to a very low value (e.g. 1) for this block, and all downstream blocks. Nonetheless, the block apparently iterates the IEnumerable greedily, which consumes all available memory on the computer, grinding

Task.WaitAll throws OperationCanceledException [closed]

跟風遠走 提交于 2020-07-18 20:44:09
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 3 years ago . Improve this question I have a list of running tasks with the same CancellationTokenSource . I want the current thread to wait until all the tasks complete or until the tasks were cancelled. Task.WaitAll(tasks.ToArray(), searchCencellationTokenSource.Token); System.Console

Task.WaitAll throws OperationCanceledException [closed]

廉价感情. 提交于 2020-07-18 20:42:25
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 3 years ago . Improve this question I have a list of running tasks with the same CancellationTokenSource . I want the current thread to wait until all the tasks complete or until the tasks were cancelled. Task.WaitAll(tasks.ToArray(), searchCencellationTokenSource.Token); System.Console

Task.WaitAll throws OperationCanceledException [closed]

时光总嘲笑我的痴心妄想 提交于 2020-07-18 20:42:06
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 3 years ago . Improve this question I have a list of running tasks with the same CancellationTokenSource . I want the current thread to wait until all the tasks complete or until the tasks were cancelled. Task.WaitAll(tasks.ToArray(), searchCencellationTokenSource.Token); System.Console

Dataflow TPL Implementing pipeline with precondition

[亡魂溺海] 提交于 2020-07-16 06:17:25
问题 I have a question about implementing pipeline using Dataflow TPL library. My case is that I have a software that needs to process some tasks concurrently. Processing looks like this: first we process album at global level, and then we go inside album and process each picture individually. Let's say that application has got processing slots and they are configurable (for the sake of example assume slots = 2). This means that application can process either: a) two albums on the same time b) one