Linked Questions

447 votes
8 answers
293k views

In C# 4.0, we have Task in the System.Threading.Tasks namespace. What is the true difference between Thread and Task. I did some sample program(help taken from MSDN) for my own sake of learning with ...
user avatar
2 votes
1 answer
269 views

Referring to the following post, which leads one to believe a .NET Task executes without native OS threads being involved. Is this true? Difference between Task (System.Threading.Task) and Thread ...
user avatar
0 votes
1 answer
197 views

I've been tinkering through some stuff, and this code sample made me wonder - should I implement the StopCalculation method with a Task, or the way it's been done is perfectly okay, and actually ...
SpiritBob's user avatar
  • 2,762
0 votes
0 answers
85 views

I'm starting new thread for every different job. I think it is better way. But with my coworker we have some conflict about using thread or task. He think Task is more efficient. But there is no ...
wikiCan's user avatar
  • 449
91 votes
4 answers
42k views

I've wondered this for quite a while, but never really found the answer. I understand that it's a hint for the task scheduler where the task will run on, and that the task scheduler can (or nowadays ...
bas's user avatar
  • 15.2k
3 votes
3 answers
20k views

**Ultimately I am going to have four tasks running concurrently and have another form that contains four progress bars. I would like for each progress bar to update as it's work task is completing. ...
UmarSlobberknocker's user avatar
4 votes
5 answers
5k views

I understand that the .Join() causes the threads to pause and wait till a thread finishes its work but how can I avoid the UI from getting frozen? This is what my codes look like" Thread dataThread = ...
Jay's user avatar
  • 5,114
1 vote
4 answers
10k views

I am new to threading and I need a clarification for the below scenario. I am working on apple push notification services. My application demands to send notifications to 30k users when a new deal is ...
dotnet developer's user avatar
2 votes
3 answers
9k views

I'm a total beginner with webservices and I ran in the following problem, which is about a webservice and asynchronous logging. (c#) Problem Description I have a webservice that returns some data to ...
Martin's user avatar
  • 320
10 votes
1 answer
4k views

There is a C# function A(arg1, arg2) which needs to be called lots of times. To do this fastest, I am using parallel programming. Take the example of the following code: long totalCalls = 2000000; ...
Ramesh Soni's user avatar
  • 16.1k
2 votes
2 answers
2k views

I have a quad core PC. I had considered programmatically of uterlising multi-core processing using the Task Parallel Library. However, when I Googled for examples I was informed that the CPU will ...
Andrew Simpson's user avatar
2 votes
3 answers
2k views

I've been reading about Tasks after asking this question and seeing that I completely misunderstood the concept. Answers such as the top answers here and here explain the idea, but I still don't get ...
ispiro's user avatar
  • 28k
5 votes
2 answers
347 views

I have the following dummy code to test out TPL in F#. (Mono 4.5, Xamarin studio, quad core MacBook Pro) To my surprise, all the processes are done on the same thread. There is no parallelism at all. ...
casbby's user avatar
  • 896
-3 votes
4 answers
1k views

For example: void Function1() { Function2(); Function3(); } Will Function3 be guaranteed to wait until Function2 is done processing each and every time Function1 is called?
usefulBee's user avatar
  • 9,856
1 vote
1 answer
2k views

I have two scenarios and I am not sure whether to use Tasks or Threads (working with dot net Framework 4.7) Scenario 1: Database Queries I have a set of data base queries that I execute with ...
tuxmania's user avatar
  • 956

15 30 50 per page