We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7762da5 commit 3da984dCopy full SHA for 3da984d
1 file changed
phpthread.go
@@ -68,7 +68,8 @@ func (thread *phpThread) boot() {
68
// reboot exits the C thread loop for full ZTS cleanup, then spawns a fresh C thread.
69
// Returns false if the thread is no longer in Ready state (e.g. shutting down).
70
func (thread *phpThread) reboot() bool {
71
- if !thread.state.CompareAndSwap(state.Ready, state.Rebooting) {
+ if !thread.state.RequestSafeStateChange(state.Rebooting) {
72
+ // thread already shutting down or done
73
return false
74
}
75
0 commit comments