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

Method shutdown

source/MREmbeddedPython/MREmbeddedPython.cpp:26–45  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

24}
25
26void EmbeddedPython::shutdown()
27{
28 if ( !isAvailable() )
29 return;
30
31 EmbeddedPython &self = instance_();
32 self.shutdownCalled_ = true;
33
34 if ( !self.interpreterThread_.joinable() )
35 return; // Nothing to do.
36
37 { // Tell the thread to stop.
38 spdlog::debug( "EmbeddedPython: shutdown, waiting for lock" );
39 std::unique_lock guard( self.cvMutex_ );
40 self.stopInterpreterThread_ = true;
41 self.cv_.notify_all();
42 }
43 spdlog::debug( "EmbeddedPython: shutdown, join python thread" );
44 self.interpreterThread_.join();
45}
46
47bool EmbeddedPython::runString( std::string pythonString, std::function<void( bool success )> onDoneAsync )
48{

Callers

nothing calls this directly

Calls 1

joinMethod · 0.45

Tested by

no test coverage detected