+ Reply to Thread
Results 1 to 3 of 3

Thread: What is Single threaded application?

  1. #1

    What is Single threaded application?

    What is Single threaded application?

    How it is different than multi-threaded?

    Should every application be multi-threaded?

    I am newbie to multi-threading.

    Please help me. Some hints would suffice.

  2. #2
    Single threaded application means, your program runs on single thread that is primary or Main Thread.

    There is no background associated with that program.

    Most of the GUI program can work in this way.

    But if you need more responsiveness than creating background thread may help in most of the cases.

    Let say that you need to display progress-bar while copying a file.

    This can be done by creating a back-ground thread which can copy the file with some chunk of data at a time and sends progress status to GUI thread.

    Please note that you should use threads carefully.

    They require shared resources to be synchronized.

    Also it is quite possible that many threads can make response worse!

    So be careful.

    Threads can be created using AfxBeginThread. CreateThread, _beginthreadex etc...

    Mutex, Semaphore, Events, Critical section can be used to make the shared data safe.

    Happy Multi-threading!

  3. #3


+ Reply to Thread

Tags for this Thread


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts