Skip to content

Commit a624e0c

Browse files
yathamravaliBrijeshNekkare
authored andcommitted
While processLoop is running don't destruct the threads too early
on zos and windows to avoid intermittent crashes. Fixes #102 Signed-off-by: Ravali Yatham <[email protected]>
1 parent 6ab6140 commit a624e0c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/ibmras/monitoring/agent/threads/WorkerThread.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,11 @@ void WorkerThread::start() {
4343
}
4444

4545
void WorkerThread::stop() {
46-
source->complete(NULL);
46+
// Issue 102: By completing pull sources too early might
47+
// intermittenlty destruct while still in processLoop.
48+
#if !defined(_WINDOWS) && !defined(_ZOS)
49+
source->complete(NULL);
50+
#endif
4751
running = false;
4852

4953
// Issue 99: By setting stopped to true too early, ThreadPool

0 commit comments

Comments
 (0)