TThread::CurrentThread - C++ Builder

C++ Builder 参考手册 ➙ TThread ➙ CurrentThread


头文件:#include
命名空间:System::Classes
类:TThread
访问权限:public:
属性定义:

__property TThread * CurrentThread = { read = GetCurrentThread };

System::Classes::TThread::CurrentThread 是 System::Classes::TThread 的静态属性,当前代码所在的线程对象。

  • 在线程类内部,this 就是当前线程对象,只有在线程类外部的时候,需要用 Current 或 CurrentThread 属性获取当前代码所在的线程对象;
  • Current 属性和 CurrentThread 属性完全相同。

例子:

请参考 TThread::CreateAnonymousThread 的例子。


参考:

  • System::Classes::TThread::Current
  • System::Classes::TThread::ExternalThread
  • System::Classes::TThread::CreateAnonymousThread
  • System::Classes::TThread::Synchronize
  • System::TCppInterfacedObject
  • System::Sysutils::_di_TProc
  • System::Classes::TThread
  • System::TObject
  • VCL 类继承关系

C++ Builder 参考手册 ➙ TThread ➙ CurrentThread

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