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 */;
プロパティ
種類 | 可視性 | ソース | ユニット | 親 |
---|---|---|---|---|
constructor | public | System.Threading.pas System.Threading.hpp |
System.Threading | TTask |
説明
オブジェクトを作成し,そのオブジェクトが最初に使用される前にデータを初期化します。
System.Threading.TTask.Create は System.TObject.Create を継承しています。以下の内容はすべて System.TObject.Create を参照しています。
オブジェクトを作成し,そのオブジェクトが最初に使用される前にデータを初期化します。
Create はオブジェクトを構築します。オブジェクトの目的,サイズ,および動作はそれぞれ大きく異なります。TObject で定義されている Create コンストラクタは,メモリの割り当ては行いますがデータの初期化は行いません。
下位オブジェクトは通常,指定のオブジェクトを作成し,そのデータを初期化するコンストラクタを定義します。
メモ: コンストラクタが発生した例外を処理しない場合,オブジェクトのデストラクタが呼び出されて失敗したインスタンスを破棄します。