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

windows - Why does Vista not allow creation of shortcuts to "Programs" on a NonAdmin account? Not supposed to install apps from NonAdmin account? -

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

unit testing - How to mock PreferenceManager in Android? -