I have an application which does some background task (network listening & reading) in a separate Thread. It seems however that the Thread is not being Terminated/Aborted when I close the application (click "x" button on titlebar). Is that because the main Thread routine is while(true) {...} ? What is the solution here? I was looking for some "interruption" flag for the Thread as the condition for "while" loop, but didn't found any.

Edit
Report