Thread: Thread programming behavior

  1. #1
    Registered User
    Join Date
    Oct 2001
    Posts
    23

    Thread programming behavior

    Hello,
    Right now I'm very new to a multi-threading programming and from the example I already applied it to my simple program and I found out that when I set my new thread to a HIGHPRIORITY, all of my menus are become very slow and when I set it to a CRITICAL my window will no longer responce.
    Is there a secret way to handle this? or Is there any link that explain this?

    Thanks...
    If they can, why can't I...

  2. #2
    It's full of stars adrianxw's Avatar
    Join Date
    Aug 2001
    Posts
    4,829
    All threads running in the system share the same CPU. If you set one thread priority higher than another, that thread will get more CPU time and the performance of the lower priority thread will suffer.

    In general, you will want to set the priority of worker threads down not up, in order to maintain the response of your user interface.
    Wave upon wave of demented avengers march cheerfully out of obscurity unto the dream.

  3. #3
    Registered User
    Join Date
    Oct 2001
    Posts
    23
    Thank you very much for the idea. Now I know the limitation.
    If they can, why can't I...

  4. #4
    Normal vector Carlos's Avatar
    Join Date
    Sep 2001
    Location
    Budapest
    Posts
    463
    Hi, thread-programming related stuff here:

    http://www.codeproject.com/threads/

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 2
    Last Post: 02-26-2009, 11:48 PM
  2. Terminating secondary thread from another thread
    By wssoh85 in forum C++ Programming
    Replies: 13
    Last Post: 12-19-2008, 05:14 AM
  3. Thread Prog in C language (seg fault)
    By kumars in forum C Programming
    Replies: 22
    Last Post: 10-09-2008, 01:17 PM
  4. Shared memory implementation using thread
    By kumars in forum C Programming
    Replies: 5
    Last Post: 06-18-2008, 04:24 AM
  5. Replies: 12
    Last Post: 05-17-2003, 05:58 AM