?
Solved

Keep a thread from using all excess CPU time.

Posted on 2005-04-29
5
Medium Priority
?
292 Views
Last Modified: 2010-04-05
Keep a thread from using all excess CPU time.  I am running a thread and no matter what I do, (even setting the priority) it uses all available cpu time thereby hording the cpu and slowing down other tasks.
0
Comment
Question by:ncostanzo
5 Comments
 
LVL 22

Expert Comment

by:Mohammed Nasman
ID: 13898862
add
sleep(1);

into your thread
0
 
LVL 5

Accepted Solution

by:
DeerBear earned 1500 total points
ID: 13900742
Alternatively, you can set its priority to Idle.
This will refrain the thread from running unless there're no active user tasks.

Cheers,

Andrew
0
 
LVL 20

Expert Comment

by:Madshi
ID: 13903618
What does that thread do? Can we see some code, please?
0
 

Author Comment

by:ncostanzo
ID: 13911407
The above did not solve the problem.

We removed the thread from our program and are doing it another way.  I withdraw the question.
0
 
LVL 22

Expert Comment

by:Mohammed Nasman
ID: 13915407
if you showed some code of the thread, Madshi could help you, he's guru in this and all low level stuff
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
Screencast - Getting to Know the Pipeline
Suggested Courses
Course of the Month16 days, 22 hours left to enroll

864 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question