I am sure that this question was asked earlier, but after searching on Google and here I did not find anything.
Here is my situation, I have several threads that write to a file, and the main thread that creates the printing machine and processes the creation of the file and closing the printing device inside the finally block in a try / catch loop. When I run the application inside eclipse, I click the stop / terminate button and there is nothing written in the file. I want to make sure that I am doing everything right here, or if there is a better way to deal with closing the printing device whenever execution stops. Heck, if there is a better way to handle multiple threads writing to a file, I can join this tip (I'm pretty terrible at multithreaded programming right now).
source share