a hybirdthread model in c/c++