Article View: borland.public.cppbuilder.nativeapi
Article #12802Re: How can i rise the priority of one process
From: Eelke Klein
Date: Tue, 18 Nov 2003 13:07
Date: Tue, 18 Nov 2003 13:07
17 lines
1680 bytes
1680 bytes
Antonio Farfan wrote: > Hello everybody: > > i have an application multithread, and i want to use all the resource of > CPU. I set the priority > of the threads to Highest Critical, but my doubt is that if this thread is > scheduled with all process in the system, or it is scheduled under his > process. How can i modify the priority of the main thread VCL. Its scheduled with all other threads, as far as windows is concerned there is no such thing as a main thread. You could call GetCurrentThread to obtain the thread handle and call SetThreadPriority to raise the priority. WARNING When raising thread priorities make shure you do not hog the CPU. Eelke
Technical Details
Message-ID:
<3fba1968$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<3fb9f69b$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,ba1f8727712e7aa4 X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2003-11-18 05:09:36 PST Date: Tue, 18 Nov 2003 14:07:21 +0100 From: Eelke Klein <e.klein@mplussoftware.nl> User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.5) Gecko/20031007 X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: borland.public.cppbuilder.nativeapi Subject: Re: How can i rise the priority of one process References: <3fb9f69b$1@newsgroups.borland.com> In-Reply-To: <3fb9f69b$1@newsgroups.borland.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 81.58.1.162 Message-ID: <3fba1968$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1069160808 81.58.1.162 (18 Nov 2003 05:06:48 -0700) Lines: 18 Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail