Questions that relate specifically to the .NET Task Parallel Library
0
votes
0answers
119 views
Using Barrier to Implement Go's Wait Group
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
107 views
Tasks: exceptions and cancelation
I need to do a long running task. I've done this by executing a Task while there's a loading box on the UI. When an exception is thrown, I want to stop the task and show a msgbox to the user. If ...
1
vote
0answers
65 views
Need guidance using Tasks
I am doing multithreading using TPL Tasks first time. This is what i have done so far and I want to do it the right way. I will really appreciate if you could honor me with your expert advice.
I am ...
4
votes
1answer
392 views
C# 5 Async Await .Task.Factory.StartNew cancellation
I have the async code that implements cancellation token. It's working but Im not pretty sure if this is the right way to do it so I just want feedback about it.
Here is the actual code:
/// ...
1
vote
0answers
98 views
Memory leaks and clunky TPL code [closed]
The problem my code tries to solve is the following: I need to update a specific part of the GUI. However, since database access is needed in order to perform that update, it must be done in a ...
4
votes
2answers
143 views
Task.Finally extension, good, bad, or ugly?
I wrote this, and it has helped to avoid the 'Some exception weren't handled' problem. Is there something glaringly wrong with this that I might have missed?
/// <summary>
/// Handles ...
1
vote
1answer
444 views
Use and Understanding of async/await in .NET 4.5 +
All, please take the following example code
CancellationTokenSource cancelSource;
// Mark the event handler with async so you can use await in it.
private async void StartButton_Click(object ...
1
vote
1answer
304 views
TPL Thread Leak and Memory Leak
I'm trying to track down what I suppose to be memory/thread leak in one of my programs.
My program uses a function to upload a file to a Windows Azure Storage Blob. In order to make this function ...
3
votes
2answers
170 views
Please review my UNC path exists monitor
This is my first attempt at trying to write a "monitor" class to determine if a UNC path is available. I need the monitor to not block the main thread and to also event when the UNC is toggled UP/DOWN ...
2
votes
1answer
899 views
Correct approach to wait for multiple async methods to complete
I have an IWorkflow interface defined as follows:
public interface IWorkflow
{
Task ConfigureAsync();
Task StartAsync();
Task StopAsync();
}
And I have an Engine class:
public sealed ...