revise qthread.c