[fpc-pascal] Current TThread

Jonas Maebe jonas.maebe at elis.ugent.be
Tue Dec 21 15:07:40 CET 2010

On 21 Dec 2010, at 14:59, michael.vancanneyt at wisa.be wrote:

> On Tue, 21 Dec 2010, Mattias Gaertner wrote:
>> What about using a
>> threadvar CurrentThread: Thread;
>> ?
>> TThread could set this in the constructor.
> This could be done, but will give errors for externally created  
> threads.

And for threads created with BeginThread.

> But you can easily do this for your own thread objects.

I also think that's the best solution. If that's not enough, then  
doing it in tthread won't be enough either (unless you only support  
applications that exclusively use tthread-based threads).


More information about the fpc-pascal mailing list