Skip to content

Commit c0f0c19

Browse files
committed
ext/opcache: document lack of kill_all_lockers() on Windows
kill_all_lockers() is not implemented on Windows, and does not need to be.
1 parent 292ea9b commit c0f0c19

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

ext/opcache/ZendAccelerator.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -896,6 +896,13 @@ static inline void kill_all_lockers(struct flock *mem_usage_check)
896896
static inline int accel_is_inactive(void)
897897
{
898898
#ifdef ZEND_WIN32
899+
/* on Windows, we don't need kill_all_lockers() because SAPIs
900+
that work on Windows don't manage child processes (and we
901+
can't do anything about hanging threads anyway); therefore
902+
on Windows, we can simply manage this counter with atomics
903+
instead of flocks (atomics are much faster but they don't
904+
provide us with the PID of locker processes) */
905+
899906
if (LOCKVAL(mem_usage) == 0) {
900907
return SUCCESS;
901908
}

0 commit comments

Comments
 (0)