Modify the thread class and add new code
use friend function to realize the thread class
add threadmanager implementation