Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
W2T TS user causes TS to hang
Message
De
24/10/2001 06:26:53
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Installation et configuration
Divers
Thread ID:
00571088
Message ID:
00572487
Vues:
17
>>Task Manager does not show processors separately. I think it shows total cpu usage 100%. How I can look to processors separately ?
>
>View/CPU History/One graph per CPU.
>
>>I have the same problem with single processor W2K terminal server.
>>Is it possible to solve this by using windows API SetPriorityClass() to decrease
>>long-computing vfp program priority or is there a better solution ?
>
>You can do the same thing by right-clicking on the process in the Processes tab of the task manager. Don't know if it'll help, but it doesn't take much to try.

My idea is to decrease priority before long calculaton and restore it
after end of long calculation.
Will this program do this ?
declare INTEGER SetPriorityClass IN WIN32API ;
        INTEGER ProcessHandle, INTEGER dwPriorityClass

declare INTEGER GetCurrentProcess IN WIN32API

IF SetPriorityClass(GetCurrentProcess(), 0x40)=0
  MESSAGEBOX( 'Error')  
ENDIF


DECLARE INTEGER SetThreadPriority IN KERNEL32.DLL ;
   INTEGER hThread, ;
   INTEGER nPriority
DECLARE INTEGER GetCurrentThread in KERNEL32.DLL

THREAD_PRIORITY_NORMAL = 0
THREAD_PRIORITY_BELOW_NORMAL = -1
THREAD_PRIORITY_LOWEST = -2

IF SetThreadPriority(GetCurrentThread(),THREAD_PRIORITY_LOWEST) = 0
  MESSAGEBOX('error')
  ENDIF
Andrus
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform