http://codereview.stackexchange.com/questions/29656/threading-in-java