mirror of
https://github.com/eclipse/paho.mqtt-sn.embedded-c.git
synced 2025-12-14 07:56:52 +01:00
Update: Thread Termination procedure
to release all pthread allocate memories. Signed-off-by: tomoaki <tomoaki@tomy-tech.com>
This commit is contained in:
@@ -514,3 +514,11 @@ void Thread::stopProcess(void)
|
||||
theMultiTaskProcess->threadStoped();
|
||||
}
|
||||
|
||||
void Thread::stop(void)
|
||||
{
|
||||
if ( _threadID )
|
||||
{
|
||||
pthread_join(_threadID, NULL);
|
||||
_threadID = 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -128,6 +128,7 @@ public:
|
||||
virtual void initialize(int argc, char** argv);
|
||||
void stopProcess(void);
|
||||
void waitStop(void);
|
||||
void stop(void);
|
||||
private:
|
||||
static void* _run(void*);
|
||||
pthread_t _threadID;
|
||||
|
||||
Reference in New Issue
Block a user