revert as multi-thread not support to remove this code by now
distinguish single and multiple thread