C++11 create fast and periodic communication thread with shared buffer to slower main processing loop