synchronous with multithread