The Task Parallel Library is part of .NET 4. It is a set of APIs to enable developers to program multicore shared memory processors.
0
votes
0answers
9 views
Updating progress in TextBlock using background thread
My WPF Window has a TextBlock encased in a ScrollViewer.
<Window x:Class="WpfScrollProgress.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
...
0
votes
1answer
19 views
Parallel Objects Initialization
I need some explanation in how to create a lot of objects in a parallel way using C#. Right now I'm doing a very lazy thing (see the example at the bottom). I'd like to improve the performance using ...
1
vote
1answer
28 views
Issue with ballooning threads in periodic processing
I want to do some periodic work on a worker thread which signals when the work is completed. When signaled, I want to wait for 5 seconds and re-do the work. I wrote the following code:
public class ...
-1
votes
1answer
17 views
Explanation of .Net 4 Tasks with Callback Parallel Programming
If I have a system where it uses tasks that are independent of each other; I want to run multiple tasks at once(I do not want the second task to run when the first to finish). Is there a way to do ...
4
votes
2answers
47 views
Make Reactive Extensions Buffer wait for asynchronous operation to complete
I am using Reactive Extensions (Rx) to buffer some data. I'm having an issue though in that I then need to do something asynchronous with this data, yet I don't want the buffer to pass the next group ...
0
votes
1answer
31 views
Running multiple Tasks from button click (UI thread) - how to know if they all succeeded or some failed?
I have WPF application where in a button click handler I want to start multiple tasks (where each may perform a long running operation).
I want to report to the user whether all tasks succeeded, or ...
0
votes
1answer
55 views
Task.IsCompleted stays false even when CancelIsRequested
In my LogManager, I have an async task that runs a while loop to write log information to a text file (and add it to a collection). When I try to cancel this task, the loop seems to stop (I tried with ...
1
vote
3answers
65 views
Waiting on tasks to finish
I'm new to threading and i'm trying to figure out a way to use tasks to accomplish this :
private void botCore()
{
if (CheckBox2.Checked == true)
{
Task Core = ...
3
votes
1answer
46 views
Convert IEnumerable<Task<T>> to IObservable<T>
I'm trying to use the Reactive Extensions (Rx) to buffer an enumeration of Tasks as they complete. Does anyone know if there is a clean built-in way of doing this? The ToObservable extension method ...
1
vote
0answers
10 views
handling taskfactory task cancellation
I am trying to have some control on the tasks I am creating using the taskfactory (parallel tasks) library in .net. My caller process creates two tasks that run two different methods accessible from ...
0
votes
0answers
34 views
Using Barrier to Implement Go's Wait Group [migrated]
I have implemented a WaitGroup class to simulate WaitGroup in Go lang. Then I've found that I can use Barrier in a different manner, to achieve the same thing. My WaitGroup has some additional ...
3
votes
2answers
52 views
Thread safety of yield return with Parallel.ForEach()
Consider the following code sample, which creates an enumerable collection of integers and processes it in parallel:
namespace ParallelEnumTest
{
using System.Collections.Generic;
using ...
1
vote
3answers
83 views
How to determine when all task is completed
here is sample code for starting multiple task
Task.Factory.StartNew(() =>
{
//foreach (KeyValuePair<string, string> entry in dicList)
...
1
vote
2answers
33 views
Why is my task in Application_Start() being stopped/cancelled/terminated?
I have the following code in my ASP.NET MVC 4 Web Application:
Global.asax.cs
protected void Application_Start()
{
Task.Factory.StartNew(
() =>
{
while ...
1
vote
1answer
70 views
Enhance performance of method
how can the following method perform better?
First some background information:
A mapping between form and used logics (on a deeper layer) is put in a dictionary CtrlLogicMapping.
A control can ...