mirror of
https://github.com/php/frankenphp.git
synced 2026-03-24 00:52:11 +01:00
don't wait for resetting in php 8.2
This commit is contained in:
@@ -777,7 +777,7 @@ func restartThreadsAndOpcacheReset(withRegularThreads bool) {
|
||||
|
||||
threadsToRestart := drainThreads(withRegularThreads)
|
||||
|
||||
// on 8.2 debian it segfaults, skip opcache reset
|
||||
// on 8.2 opcache_reset() segfaults, skip it entirely
|
||||
if Version().VersionID >= 80300 {
|
||||
opcacheResetOnce = sync.Once{}
|
||||
opcacheResetWg := sync.WaitGroup{}
|
||||
@@ -787,7 +787,6 @@ func restartThreadsAndOpcacheReset(withRegularThreads bool) {
|
||||
thread.state.WaitFor(state.OpcacheResettingDone)
|
||||
})
|
||||
}
|
||||
|
||||
opcacheResetWg.Wait()
|
||||
}
|
||||
|
||||
|
||||
@@ -50,9 +50,11 @@ func (handler *regularThread) beforeScriptExecution() string {
|
||||
return handler.waitForRequest()
|
||||
case state.Restarting:
|
||||
handler.state.Set(state.Yielding)
|
||||
handler.state.WaitFor(state.OpcacheResetting)
|
||||
scheduleOpcacheReset(handler.thread)
|
||||
handler.state.Set(state.OpcacheResettingDone)
|
||||
if Version().VersionID >= 80300 {
|
||||
handler.state.WaitFor(state.OpcacheResetting)
|
||||
scheduleOpcacheReset(handler.thread)
|
||||
handler.state.Set(state.OpcacheResettingDone)
|
||||
}
|
||||
handler.state.WaitFor(state.Ready, state.ShuttingDown)
|
||||
return handler.beforeScriptExecution()
|
||||
|
||||
|
||||
@@ -51,9 +51,11 @@ func (handler *workerThread) beforeScriptExecution() string {
|
||||
handler.worker.onThreadShutdown(handler.thread.threadIndex)
|
||||
}
|
||||
handler.state.Set(state.Yielding)
|
||||
handler.state.WaitFor(state.OpcacheResetting)
|
||||
scheduleOpcacheReset(handler.thread)
|
||||
handler.state.Set(state.OpcacheResettingDone)
|
||||
if Version().VersionID >= 80300 {
|
||||
handler.state.WaitFor(state.OpcacheResetting)
|
||||
scheduleOpcacheReset(handler.thread)
|
||||
handler.state.Set(state.OpcacheResettingDone)
|
||||
}
|
||||
handler.state.WaitFor(state.Ready, state.ShuttingDown)
|
||||
return handler.beforeScriptExecution()
|
||||
case state.Ready, state.TransitionComplete:
|
||||
|
||||
Reference in New Issue
Block a user