Skip to content

Commit 159bf70

Browse files
committed
ensure flag is thread local for multi-threaded contexts
1 parent 1ed0ebd commit 159bf70

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Zend/zend_max_execution_timer.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
# define sigev_notify_thread_id _sigev_un._tid
3434
# endif
3535

36-
int is_handler_set = 0; // global flag
36+
_Thread_local int is_handler_set = 0; // whether we have setup a timer in this thread
3737

3838
ZEND_API void zend_max_execution_timer_init(void) /* {{{ */
3939
{

0 commit comments

Comments
 (0)