MCPcopy Create free account
hub / github.com/OpenZWave/open-zwave / Stop

Method Stop

cpp/src/platform/Thread.cpp:85–100  ·  view source on GitHub ↗

----------------------------------------------------------------------------- Stop a function running on this thread -----------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

83// Stop a function running on this thread
84//-----------------------------------------------------------------------------
85bool Thread::Stop
86(
87)
88{
89 int32 timeout = 2000; // Give the thread 2 seconds to exit
90 m_exitEvent->Set();
91
92 if( Wait::Single( this, timeout ) < 0 )
93 {
94 // Timed out
95 m_pImpl->Terminate();
96 return false;
97 }
98
99 return true;
100}
101
102//-----------------------------------------------------------------------------
103// <Thread::Sleep>

Callers 5

~DriverMethod · 0.80
WriteMsgMethod · 0.80
CloseMethod · 0.80
CloseMethod · 0.80

Calls 2

SetMethod · 0.45
TerminateMethod · 0.45

Tested by

no test coverage detected