Show: Delphi C++
Display Preferences

System.Classes.TThread.CreateAnonymousThread

From XE2 API Documentation
Jump to: navigation, search

Delphi

class function CreateAnonymousThread(const ThreadProc: TProc): TThread; static;

C++

static TThread* __fastcall CreateAnonymousThread(const System::Sysutils::_di_TProc ThreadProc);

Properties

Type Visibility Source Unit Parent
function public
System.Classes.pas
System.Classes.hpp
System.Classes TThread

Description

Creates an instance of an internally derived thread.

CreateAnonymousThread creates an instance of an internally derived TThread that simply will call the anonymous method of type TProc. This thread is created as suspended, so you should call the Start method to make the thread run. The thread is also marked as FreeOnTerminate, so you should not touch the returned instance after calling Start. It is possible that the instance had run and then has been freed before other external calls or operations on the instance were attempted.


See Also

Personal tools
Previous Versions
Translations