Update: Thread Termination procedure

to release all pthread allocate memories.

Signed-off-by: tomoaki <tomoaki@tomy-tech.com>
This commit is contained in:
tomoaki
2016-10-26 11:33:25 +09:00
parent c3e8470812
commit 5026c94502
5 changed files with 17 additions and 4 deletions

View File

@@ -235,7 +235,7 @@ void Gateway::run(void)
MultiTaskProcess::run();
/* stop threads */
/* stop Tasks */
Event* ev = new Event();
ev->setStop();
_packetEventQue.post(ev);
@@ -246,7 +246,7 @@ void Gateway::run(void)
ev->setStop();
_clientSendQue.post(ev);
/* wait until all threads stop */
/* wait until all Task stop */
MultiTaskProcess::waitStop();
WRITELOG("\n%s MQTT-SN Gateway stoped\n\n", currentDateTime());