--- q_a/samples/threads/readme.txt 2018/08/09 18:29:34 1.1.1.1 +++ q_a/samples/threads/readme.txt 2018/08/09 18:29:59 1.1.1.2 @@ -1,4 +1,5 @@ - Sample: Using Thread API Functions +Sample: Using Thread API Functions + Summary: The THREADS sample application shows how to use @@ -24,33 +25,18 @@ SuspendThread can be used to obtain the count before the call was made. Only when the suspension count is zero will the thread run. -A thread has only five priorities that you are allowed to -use: +A thread now has seven priorities exposed at the API level: + THREAD_PRIORITY_IDLE THREAD_PRIORITY_LOWEST THREAD_PRIORITY_BELOW_NORMAL THREAD_PRIORITY_NORMAL THREAD_PRIORITY_ABOVE_NORMAL THREAD_PRIORITY_HIGHEST + THREAD_PRIORITY_TIME_CRITICAL -Other priorities are reserved for use by the system only. - -The following is a list of the Win32 API functions used in -this sample: - - CreateSolidBr GetMessage Rectangle Sleep - ush - CreateThread GetStockObjec RegisterClass SuspendThread - t - CreateWindow GetSystemTime ReleaseDC TerminateThre - ad - DispatchMessa LoadCursor ResumeThread wsprintf - ge - GetClientRect LoadIcon SelectObject - GetDC MessageBox SetThreadPrio - rity - GetLastError PostQuitMessa ShowWindow - ge - - - +Note that THREAD_PRIORITY_TIME_CRITICAL should be used very +cautiously by an application, and only if needed. Setting a +thread to this level will interfere with the application's +window performance, and the performance of other applications +being run on the system.