update.
for multithread.