MCPcopy Create free account
hub / github.com/MeshInspector/MeshLib / AsyncRequest

Method AsyncRequest

source/MRViewer/MRAsyncTimer.cpp:65–80  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

63
64#ifndef __EMSCRIPTEN__
65AsyncRequest::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
82AsyncRequest::~AsyncRequest()
83{

Callers

nothing calls this directly

Calls 2

SetCurrentThreadNameFunction · 0.85
waitBlockingMethod · 0.80

Tested by

no test coverage detected