I\'m porting a FreeRTOS-based application to C++ std threads. The basic structure of the application contains a an "event loop" thread, which works as such: