API:System.Threading.TTask.Create
Delphi
constructor Create(Sender: TObject; Event: TNotifyEvent; const AProc: TProc; const APool: TThreadPool; const AParent: TTask; CreateFlags: TCreateFlags = []); overload;
constructor Create; overload; // do not call this constructor!!
class function Create(Sender: TObject; Event: TNotifyEvent): ITask; overload; static; inline;
class function Create(const Proc: TProc): ITask; overload; static; inline;
class function Create(Sender: TObject; Event: TNotifyEvent; const APool: TThreadPool): ITask; overload; static; inline;
class function Create(const Proc: TProc; APool: TThreadPool): ITask; overload; static; inline;
C++
__fastcall TTask(System::TObject* Sender, System::Classes::TNotifyEvent Event, const System::Sysutils::_di_TProc AProc, TThreadPool* const APool, TTask* const AParent, TCreateFlags CreateFlags)/* overload */;
__fastcall TTask(void)/* overload */;
static _di_ITask __fastcall Create(System::TObject* Sender, System::Classes::TNotifyEvent Event)/* overload */;
static _di_ITask __fastcall Create(const System::Sysutils::_di_TProc Proc)/* overload */;
static _di_ITask __fastcall Create(System::TObject* Sender, System::Classes::TNotifyEvent Event, TThreadPool* const APool)/* overload */;
static _di_ITask __fastcall Create(const System::Sysutils::_di_TProc Proc, TThreadPool* APool)/* overload */;
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
constructor | public | System.Threading.pas System.Threading.hpp |
System.Threading | TTask |
Description
Constructs an object and initializes its data before the object is first used.
System.Threading.TTask.Create inherits from System.TObject.Create. All content below this line refers to System.TObject.Create.
Constructs an object and initializes its data before the object is first used.
Create constructs an object. The purpose, size, and behavior of objects differ greatly. The Create constructor defined by TObject allocates memory but does not initialize data.
Descendant objects usually define a constructor that creates the particular kind of object and initializes its data.
Note: If an exception escapes from a constructor, the object's destructor is called to clean up the failed instance.