Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit fb4c3ff

Browse files
committed
bugix: fix thread inturruption detection
1 parent f0de44e commit fb4c3ff

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/utils/logger.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -130,13 +130,13 @@ exit_if_necessary(int elevel)
130130
/* If this is not the main thread then don't call exit() */
131131
if (main_tid != pthread_self())
132132
{
133+
/* Interrupt other possible routines */
134+
thread_interrupted = true;
133135
#ifdef WIN32
134136
ExitThread(elevel);
135137
#else
136138
pthread_exit(NULL);
137139
#endif
138-
/* Interrupt other possible routines */
139-
thread_interrupted = true;
140140
}
141141
else
142142
exit(elevel);

0 commit comments

Comments
 (0)