Client Code - Multi-threading

Further improvement of function