C++ Builder 參考手冊 ? System::Classes ? TThread ? Suspended
頭文件:#include <System.Classes.hpp>
命名空間:System::Classes
類:TThread
訪問權(quán)限:public:
屬性定義:
__property bool Suspended = { read = FSuspended, write = SetSuspended, nodefault };
Suspended 是 System::Classes::TThread 的屬性叹话,線程已經(jīng)被掛起。
- 用 Suspend 方法掛起線程氏豌,Suspended 屬性置為 true热凹;使用 Resume 方法繼續(xù)執(zhí)行線程瞭吃,Suspended 屬性恢復(fù)為 false歪架;
- Resume 和 Suspend 是過時(shí)的方法霹陡,調(diào)用 Resume 恢復(fù)用 Suspend 掛起的線程;
- 線程的掛起和繼續(xù)僅用來調(diào)試程序使用攒霹,用 Suspend 掛起的線程可能會(huì)引起線程死鎖浆洗,正式運(yùn)行的線程需要用其他同步方式暫停,比如等待一個(gè)事件抠刺;
- 調(diào)用 Suspend 方法掛起多少次摘昌,就要 Resume 多少次線程才可以恢復(fù)執(zhí)行聪黎。
相關(guān):
- System::Classes::TThread::Suspend
- System::Classes::TThread::Resume
- System::Classes::TThread::Start
- System::Classes::TThread::Started
- System::Classes::TThread::Terminate
- System::Classes::TThread::Terminated
- System::Classes::TThread::Finished
- System::Classes::TThread::Execute
- System::Classes::TThread
- System::Syncobjs::TEvent
- System::Syncobjs::TMutex
- System::Syncobjs::TCriticalSection
- System::TObject
- VCL 類繼承關(guān)系
C++ Builder 參考手冊 ? System::Classes ? TThread ? Suspended