Can you recommend a good series of articles or preferably a book on how to get started with threading in general and in C# in particular? I am primarily looking for the use of threads in console applications and in ASP.Net apps.
I understand only the very basics of threads and know that "here be dragons", so want to get a good grounding in it before I start using them.
Things I am curious about are things like the concept of having a threadpool, how you manage the size of it, how you choose for things to be queued until a thread is available vs forcing a new thread to start etc. Also, I understand that IIS has lots of built-in thread handling, so anything that explains how to work with threads in ASP.Net under IIS and how it differs from threading in a console C# applicaion is interesting.
My intended usage includes things like;
The user does something on the ASP.Net page that causes my server-side code to need to connect to another system and carry out lengthy operations, so I want to return control to the user quickly by firing that action to another thread. The user can keep watching progress through AJAX or simply move away - the web is stateless after all :)
Use of Fire and Forget patterns (lots of sample code out there, I want to understand more about how they work)
Thanks
As well as my own articles linked by Andrew, Joe Albahari has another tutorial.
If you want a really thorough examination, read Joe Duffy's Concurrent Programming in Windows.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With