News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Note to Jibz on Sleep() API

Started by hutch--, May 09, 2005, 02:22:21 PM

Previous topic - Next topic

hutch--

Jibz,

I had no way of reprodcing your direct test using rar so I wrote a number of test pieces including the last one which was a callable exe that set its own priority to IDLE_PRIORITY_CLASS.

With this test piece I was able to reproduce the problem you mentioned. It effects nothing above tasks running IDLE_PRIORITY_CLASS.

With the calling app and the called app both running IDLE_PRIORITY_CLASS the processor usage displayed at 100% even though everything else still ran as normal. I tested your suggestion about setting the time delay in Sleep() to 1 or higher and by introducing the delay the processor usage dropped to the same as before either app was run.

I will use the sugestion in the shell_ex procedure as it is pointed at general purpose work and while I doubt tha there is much use for starting an idle priority thread from a calling app synchronously, the 1 millisecond delay in Sleep() sovles the problem you mentioned.
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php