What 4 threads are running under an empty new VCL forms application?
delphi, delphi-xe2, multithreading, vcl
Solution
To determine the source of the threads, you can inspect the start address of the threads using a tool like process explorer or process hacker.
In this case for example you can see
- ntdll.dll!TpCallbackIndependent+0x????? which is part of the Windows threadpool API.
- ntdll.dll!RtlMoveMemory+0x????? is a call to the RtlMoveMemory WinAPi function.
- Project??.Exe+0x????? Main thread of the App.
Problem
Possible Duplicate: What are the other threads in a default VCL application, and can they be named by purpose? When running a new empty VCL Forms Application in Delphi XE2 (32bit), I see 4 threads running in the Task Manager for this app. Obviously any app requires at least 1 thread, but in this case, what are the other 3 threads? I'd like to have a better understanding of what threads any VCL forms application runs by default. I thought possibly it had to be the fact that I was running in debug mode from RAD Studio, so I launched the EXE its self, and it also had 4 threads running. I also tried compiling under "release" config (thus disabling compiling debug info) and there are still 4 threads.