Thread added to "foreach"-loop in Main.