Made main thread wait until thread that checks for twitter the api finishes
thread safe changes