When does background threads prevent the process of being terminated?
问题 Our program creates a background thread at the beginning of the program. The background thread does some database integrity checks and checks for stuff in the Internet using Indy. After 10 seconds, the background thread should be finished and since FreeOnTerminate is true, it will also clean itself up. We have noticed that in some cases, if the user closes the program too quickly, the process will still be alive until the background thread is finished. Since we couldn't exactly reproduce the