thread senior function and problem in using ubuntu