Thanks! BTW, the encapsulation is not finished yet, such as mutex and condition variable.
I'll go on with the work, and welcome to contribute if you're interested!
I think The C++ thread library is overdesigned so it lost some function. What's more, on Linux it's chicken ribs. So I encapsulate POSIX Threads using C++, to take advantage of RAII.
Thanks. Why don't I use the C++11 thread library? 1, I wrote this code on Linux and it's only used on Linux, so I don't consider portability issues. 2, actually, I dislike some classes name in the C++ thread library, so....