multithreading - Get the TThread object for the currently executing thread? -


i want function getcurrentthread returns tthread object of current executing thread. know there win32 api call getcurrentthread, returns thread id. if there possibility tthread object id that's fine.

the latest version of delphi, delphi 2009, has currentthread class property on tthread class.

this return proper delphi thread object if it's native thread. if thread "alien" thread, i.e. created using other mechanism or on callback third party thread, create wrapper thread around thread handle.


Comments

Popular posts from this blog

c++ - How do I get a multi line tooltip in MFC -

asp.net - In javascript how to find the height and width -

c# - DataTable to EnumerableRowCollection -