TThread::Suspend - C++ Builder

C++ Builder 参考手册 ➙ System::Classes ➙ TThread ➙ Suspend


头文件:#include
命名空间:System::Classes
类:TThread
访问权限:public:
函数原型:

void __fastcall Suspend(void);

Suspend 是 System::Classes::TThread 的成员函数,挂起线程,是过时的方法。

参数:

无。

返回值:

无。

  • Resume 和 Suspend 是过时的方法,调用 Resume 恢复用 Suspend 挂起的线程;
  • 线程的挂起和继续仅用来调试程序使用,用 Suspend 挂起的线程可能会引起线程死锁,正式运行的线程需要用其他同步方式暂停,比如等待一个事件;
  • 调用 Suspend 方法挂起多少次,就要 Resume 多少次线程才可以恢复执行。

相关:

  • System::Classes::TThread::Suspended
  • 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 类继承关系

C++ Builder 参考手册 ➙ System::Classes ➙ TThread ➙ Suspend

你可能感兴趣的:(TThread::Suspend - C++ Builder)