Skip to content

Commit 9a072c3

Browse files
committed
docs: address Copilot review (round 7)
- es/extension-workers.md: translate the "Server"/"Thread" column labels in the hooks table to "Servidor"/"Hilo" so the Spanish doc is consistent. - internals.md: drop the private function names from the Upscaling/Downscaling sections; describe the goroutines by behavior instead, so the doc doesn't drift if those identifiers are renamed. Signed-off-by: Kévin Dunglas <kevin@dunglas.fr>
1 parent 746610a commit 9a072c3

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

docs/es/extension-workers.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -137,10 +137,10 @@ FrankenPHP proporciona hooks para ejecutar código Go en puntos específicos del
137137

138138
| Tipo de Hook | Nombre de Opción | Firma | Contexto y Caso de Uso |
139139
| :----------- | :--------------------------- | :------------------- | :------------------------------------------------------------------------------- |
140-
| **Server** | `WithWorkerOnServerStartup` | `func()` | Configuración global. Se ejecuta **Una vez**. Ejemplo: Conectar a NATS/Redis. |
141-
| **Server** | `WithWorkerOnServerShutdown` | `func()` | Limpieza global. Se ejecuta **Una vez**. Ejemplo: Cerrar conexiones compartidas. |
142-
| **Thread** | `WithWorkerOnReady` | `func(threadID int)` | Configuración por hilo. Llamado cuando un hilo inicia. Recibe el ID del hilo. |
143-
| **Thread** | `WithWorkerOnShutdown` | `func(threadID int)` | Limpieza por hilo. Recibe el ID del hilo. |
140+
| **Servidor** | `WithWorkerOnServerStartup` | `func()` | Configuración global. Se ejecuta **Una vez**. Ejemplo: Conectar a NATS/Redis. |
141+
| **Servidor** | `WithWorkerOnServerShutdown` | `func()` | Limpieza global. Se ejecuta **Una vez**. Ejemplo: Cerrar conexiones compartidas. |
142+
| **Hilo** | `WithWorkerOnReady` | `func(threadID int)` | Configuración por hilo. Llamado cuando un hilo inicia. Recibe el ID del hilo. |
143+
| **Hilo** | `WithWorkerOnShutdown` | `func(threadID int)` | Limpieza por hilo. Recibe el ID del hilo. |
144144

145145
### Ejemplo
146146

docs/internals.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ FrankenPHP can automatically scale the number of PHP threads based on demand (`s
201201

202202
### Upscaling
203203

204-
A single goroutine (`startUpscalingThreads`) reads from an unbuffered `scaleChan`:
204+
A dedicated goroutine reads from an unbuffered `scaleChan`:
205205

206206
1. A request handler can't find an available thread
207207
2. It sends the request context to `scaleChan`
@@ -213,7 +213,7 @@ A single goroutine (`startUpscalingThreads`) reads from an unbuffered `scaleChan
213213

214214
### Downscaling
215215

216-
A separate goroutine (`startDownScalingThreads`) periodically checks (every 5s) for idle auto-scaled threads. Threads in `Ready` state idle longer than `maxIdleTime` (default 5s) are converted to `Inactive` via `convertToInactiveThread()` (up to 10 per cycle). They are not fully stopped: a code path exists for that, but it is currently disabled because some PECL extensions leak memory and prevent threads from cleanly shutting down.
216+
A separate goroutine periodically checks (every 5s) for idle auto-scaled threads. Threads in `Ready` state idle longer than `maxIdleTime` (default 5s) are converted to `Inactive` (up to 10 per cycle). They are not fully stopped: a code path exists for that, but it is currently disabled because some PECL extensions leak memory and prevent threads from cleanly shutting down.
217217

218218
## Environment Sandboxing
219219

0 commit comments

Comments
 (0)