OpenSwoole\Server->on('ManagerStop', fn)

Latest version: pecl install openswoole-22.1.2 | composer require openswoole/core:22.1.5

Declaration

<?php OpenSwoole\Server->on('ManagerStop', Callable $callback)

Parameters

event

The event callback name.

callback

Callable event function.

Return

success

If success, it returns true, otherwise it returns false.

Description

Execute the callback function when the Manager Process in the Server is stopped.

The callback function registered for event ManagerStop is executed in the manager process.

When this event is triggered, all worker and task worker process have already been stopped and finished running.

Example

<?php
$server->on('ManagerStop', function(OpenSwoole\Server $server)
{
  // ...
});
Last updated on September 1, 2022