1
vote
Vote UpVote

I totally forgot that Delphi has had a function to get the current executing thread – Stack Overflow

The Wiert Corner – While updating some old code fiddling with the[WayBack] GetThreadId function, I wanted to have some TThread wrapper around it. I had totally forgotten there has been already a means for this since Delphi 2009 (which initially had a bug, but that was worked around at first and fixed later): [WayBack] CurrentThread. The latest version of Delphi, Delphi 2009, has a CurrentThread class property on the TThread class. This will return the proper Delphi thread object if it’s a native thread. If the thread is an “alien” thread, i.e. created using some other mechanism or on a callback ...
Favorite? Off-Topic? jpluimers @ 2018-07-05 07:04

Statistics

Visits: 371
Votes: 1
Favorites: 0
Off-Topic: 0

Visits by Source

User Actions

Users who voted for this posting

Alister Christie
Subscribe:
Contact us to advertise on DelphiFeeds.com

Community Links

Torry Firebird News

Sponsor

 
Please login or register to use this functionality.
(click on this box to dismiss)