Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3627188
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T23:51:24+00:00 2026-05-18T23:51:24+00:00

Just trying to ping up some experienced Thread gurus out there…trying to learn more

  • 0

Just trying to ping up some experienced Thread gurus out there…trying to learn more about threading without many real code issues at the moment that would help me practice it more.

I’ve got some resources already but probably there are some good ones I do not know of out there:

  1. C# 2008 and 2005 Threaded Programming: Beginner’s Guide (Book) (this is the one I’m thinking about starting to look at first)
  2. CLR via C# (Dev-Pro) (I have this book also and Jeffery has some threading stuff in here too)
  3. Threading in C# – eBook
  4. Concurrent Programming on Windows
  5. .NET Multi-threading Book from 2003 (Book) (not sure if this stuff is outdated…)

So:

1) Looking for others (videos, books, etc.) and also what your opinion is on the resources above (would you recommend certain ones as better or ones as outdated / bad?).

2) Also, since this is a broad and highly complex topic…being a complete foreigner to this, I’m trying to narrow down some kind of sane study list. Threading is deeeeeeeep so I just want to cover the basics or most likely the areas they’ll probably touch (locking, thread safe, etc.). I don’t need to go into this interview being an expert…just show that I am not completely clueless about when to use it, common scenarios and a couple examples I can explain to them.

3) Anyone with threading experience out there to point me to some good resources or give me some good study tips or areas you think I should most definitely hit up?

4) Obviously with the advent of .NET 4.0 that changes things altogether but I am focusing on .NET 3.5 mainly here. I need to just know the basics of THREADING first…the concept, things to be aware of, locking, thread safe singletons (I know John Skeet’s page on Singletons, etc.).

5) Another thing that would help me are real world examples and reasons to use threading. Both on the IIS side, OOP side, server farms, ect. I’d like to know some real examples of use of threading or common scenarios in real life apps where you really need to start utilizing threading.

I don’t need everyone to answer all 5 of my areas here…even just advice in one of the 1-5 above would be greatly appreciated.

Thanks…

UPDATE / DISCLAIMER (after receiving a few assumptions about me)

No I’m not going to go in there claiming I know threading or am an expert in it, but that I’m a beginner and have done only a couple things at a past job and still learning. But I did want to give the context in why I’m posting this entire thread here so you can help me hone in better in a shorter period of time…filter out a path that may be better so I don’t waste my time both for the interview but also for my future learning.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T23:51:25+00:00Added an answer on May 18, 2026 at 11:51 pm

    Threading can seem very easy to learn. You just use new Thread(ThreadFunc).Start() and voila, you are using threading. How hard can it be, right?

    Threading problems are not something that you will notice directly but are something that will sneak up when you least expect it. They usually come in production systems when there are some load and sporadically shut down your system.

    After a while you will discover that you need to do synchronizing before modifying share data. And when you start doing so, you will see a large performance degrade.

    Threading is easy to get going with, but will take years to master. Protecting shared data is an art and will need a lot of thought to get it done properly. I’ve written multi threaded servers for several years, both in C++ with IO completion ports and lately in C#. I still make mistakes that can produce unexpected result in my servers.

    As for topics you need to learn:

    1. Look at some examples using Thread class.
    2. The lock keyword.
    3. Asynchronous programming (it’s very easy to do this wrong, just look at all SO questions about it). .Net uses BeginXXXX/EndXXXX for async programming.
    4. Other locking techniques than lock, for instance Semaphore and ReaderWriterLock
    5. The Interlocked class.

    I usually use this pattern for Thread functions:

    public class Example
    {
        ManualResetEvent _myEvent = new ManualResetEvent(false);
        Thread _myThread;
        bool _isRunning = true;
    
        public Example()
        {
            _myThread = new Thread(WorkerFunc);
            _myThread.Start();
        }
    
    
        public void WorkerFunc()
        {
            while (_isRunning)
            { 
                try
                {
                    _myEvent.Wait(Timeout.Infinite);
                    _myEvent.Reset();
                    ActualFunc();
                }
                catch (ThreadAbortException) { return; }
                catch (Exception err)
                {
                     _logger.Error("Thread func failed, lucky we caught it so the server don't die..", err);
                }
            }
        }
    
        public void Stop()
        {
           _isRunning = false;
           _myEvent.Set();
           _myThread.Join();
        }
    
        public void DoWork()
        {
            //add some work to the thread job queue or something
            _myEvent.Set();
        }
    
        private void ActualFunc()
        {
             //actual thread work is done here
             // in a seperate method to keep everything clean.
        }
    }
    

    Just wrote it here in the answer, do not promise that it will work 100% 🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am just trying to learn some Lisp, so I am going through project
Just trying to get my head round Spring and figuring out how I wire
While trying to figure out the best method to ping (ICMP) something from python,
The idea: I'm just trying to save some Chinese characters to a MySQL database.
Just trying to get my head around Generics by reading this enlightening article by
Just trying to get my irb sessions to actually list the current line of
Just trying to get up to speed with the SDK... So, I've created my
I'm just trying to time a piece of code. The pseudocode looks like: start
Developing a website and just trying to get back into the swing of (clever)
I'm just trying to get a general idea of what views are used for

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.