| 63 | |
| 64 | #ifndef __EMSCRIPTEN__ |
| 65 | AsyncRequest::AsyncRequest() |
| 66 | { |
| 67 | listenerThread_ = std::thread( [this] () |
| 68 | { |
| 69 | MR::SetCurrentThreadName( "AsyncRequest timer thread" ); |
| 70 | while ( timer_.waitBlocking() != AsyncTimer::Event::Terminate ) |
| 71 | { |
| 72 | std::unique_lock lock( cmdMutex_ ); |
| 73 | if ( command_ ) |
| 74 | { |
| 75 | command_(); |
| 76 | command_ = {}; |
| 77 | } |
| 78 | } |
| 79 | } ); |
| 80 | } |
| 81 | |
| 82 | AsyncRequest::~AsyncRequest() |
| 83 | { |
nothing calls this directly
no test coverage detected