When using the embedded terminal emulator build, closing the terminal signals that the main thread should exit
by sending it a hang up event. If the main thread responds, no problem. But if it doesn't, it can keep a thing
running in the background with no visible window. This timeout gives it a chance to exit cleanly, but if it
doesn't by the end of the time, the program will be forcibly closed automatically.
When using the embedded terminal emulator build, closing the terminal signals that the main thread should exit by sending it a hang up event. If the main thread responds, no problem. But if it doesn't, it can keep a thing running in the background with no visible window. This timeout gives it a chance to exit cleanly, but if it doesn't by the end of the time, the program will be forcibly closed automatically.