Questions that relate specifically to the .NET Task Parallel Library

learn more… | top users | synonyms

0
votes
1answer
49 views

Converting a method to async

I have a method that calls a "bridge" for "TraderMarketInfo". When info is received, it checks if info IsSet and raises an event. I wan to make this method async. C# .NET4.0 VS2012 Original method: ...
0
votes
2answers
361 views

C# Console Chat Server - Async/Await, TcpClient/TcpListener, NetworkStream (async)

Just looking for feedback on correctness of my understanding of async/await. Curious about the Task.Run inside of the StartReceive() method. Resharper (or maybe just the compiler) warns against ...
0
votes
1answer
138 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
138 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 ...
2
votes
1answer
90 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
837 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: /// ...
4
votes
2answers
184 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
816 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
390 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
185 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
1k 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 ...