Skip to main content

Module worker

Module worker 

Source
Expand description

ZTS worker threads โ€” each thread runs an independent PHP context.

A worker thread:

  1. Registers with TSRM via ZtsThreadGuard
  2. Starts a PHP request (request_startup)
  3. Executes the PHP worker script (which registers handlers)
  4. Enters the recv/send loop via bridge::do_recv()/bridge::do_send()
  5. Cleans up on exit

Functionsยง

spawn_zts_worker
Spawn a ZTS worker thread that executes the given PHP script.