Threads in Delphi Applications.

Threads in Delphi Applications.
I created an Empty Console application and in the Debugger I can see that 5 threads are running, all created before the first statement of the program. I then created an empty Vcl application and when the main form shows another 5 threads appear running, a total of 10 threads. Debugging does not show any thread creation except for 1 thread related to font handling.
Does anybody knows what all these threads are doing?

Comments

  1. Indded there are 4 threads in a "null" console application. Wow! (The debugger thread appears when you break into the debugger. That is normal.)

    It looks like they are created by the OS. If you compile with 'Debug info' ON and put a breakpoint on the 'initialization' in the System unit, all four thread will be already created when the program gets to this point.

    ReplyDelete
  2. Primož Gabrijelčič Try with a minimal VCL app for a bigger shock.

    ReplyDelete
  3. 5 threads immediately; 4 of them belong to a work pool. 2 are created in Application.Run. They are external threads injected by a Raptr (AMD Gaming).

    Nothing worrying.

    ReplyDelete

Post a Comment