exception process in multithreading enviroment