Questions tagged [taskcompletionsource]

TaskCompletionSource produces a Task unbound to a delegate, providing access to the consumer side through the Task property.

TaskCompletionSource produces a Task unbound to a delegate, providing access to the consumer side through the Task property.

References

79 questions
0
votes
2 answers

WP8 TaskCompletionSource not getting Result

I've an extension method for WebClient (WP8) public static Task DownloadStringTask(this WebClient webClient, Uri uri) { var tcs = new TaskCompletionSource(); webClient.DownloadStringCompleted += (s, e) => { …
Tori
  • 57
  • 5
-1
votes
2 answers

Synchronously Wait on TaskCompletionSource.Task

Sync-over-async is bad. I know. But is there a sync-over-async problem when calling TaskCompletionSource.Task.Wait()? Does the answer changes if TaskCompletionSource was created with TaskCreationOptions.RunContinuationsAsynchronously? Update To…
Artur
  • 4,595
  • 25
  • 38
-1
votes
1 answer

Get count of current active Tasks spawned by a multithreaded application

Hi I am a student intern with little to no C# experience who got put into a situation to take over a windows service that uses TaskCompletionSource and BlockingCollection to implement multithreading. I have never done C#. I am trying to optimize how…
edo101
  • 629
  • 6
  • 17
-2
votes
1 answer

C# Task Completion Source

I have a requirement with problem statement is like say, when an event gets triggered, I have to call a task completion source, using async and await. There will be multiple events occurring, and each time an event occurs this task completion has to…
Siddharth
  • 436
  • 2
  • 11
  • 29
1 2 3 4 5
6