[fpc-pascal] how to get a list of all thread id

Dennis dec12 at avidsoft.com.hk
Thu Oct 5 12:09:18 CEST 2017


In my multi thread programs (I use multiple threads in my program and 
the windows dll that I used also used multiple threads), from time to 
time, there are some problems (e.g some exceptions are raised) which 
caused my program to free after the Application.Run.

The freezing seem to occur even after the finalization of units.

 From the task manager, I can see that there are 2 running threads in my 
program (down from a dozen when the program was running ).

Using the gdb does not help me pin point which thread is running wild 
causing the freezing.

I am wonder if I can list out all running thread ids after 
Application.Run, I might find out what those 2 threads are.

Can I do that in windows 32-bit?
Dennis



More information about the fpc-pascal mailing list