(Thread) , () , . , . ( primary) . () , , .
, Win 32 , . Win 32 . , ( ). , .
, , :
(running) (active) , , ;
(ready) , , ;
(wait), (blocked), (sleep) , - .
, , , . Sleep().
Win 32 . .
(handle), , ( ). . , . , . .
CreateThread(). , , :
|
|
DWORD WINAPI ThreadProc(LPVOID pParam)
{
//,
return result;
}
, . , ( ).
, , , . . .
CreateThread() DWORD, . Window 9x . Windows NT .
OpenThread(), .
ExitThread(), , . . , , TerminateThread(), , , . , , .
, SuspendThread() ResumeThread() . , , () . SuspendThread() , ResumeThread() , . , .
, .
1. .
2. , .
3. , .
4. .
5. Sleep(), SleepEx(),
Start Stop. Start . Stop . Start. , .
11.3.1. , . .
11.3.2. . , .
11.3.3. Edit. , Edit.
|
|
11.3.4. . .
11.3.5. .
11.3.6. .
11.3.7. .
11.3.8. . , .
11.3.9. : , .
11.3.10. : , , .
11.3.11. , .
11.3.12. , , , , .
11.3.13. . , .
11.3.14. , ProgressBar ( ).
11.3.15. , . .
12
:
1) Win32 ;
2) .