C++ interthreads library