Implemented syncronized thread