std::thread caused errors on the raspberry pi, created drop-in replacement for std::thread