Skip to content

Commit

Permalink
documentation updates
Browse files Browse the repository at this point in the history
Signed-off-by: Demin Yin <deminy@deminy.net>
  • Loading branch information
deminy committed Dec 21, 2021
1 parent 58a1286 commit 05c2ab9
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
14 changes: 14 additions & 0 deletions src/swoole/Swoole/Process.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,22 @@ class Process

public $msgQueueKey;

/**
* Process ID. This is to uniquely identify the process in the OS.
*
* @var int
*/
public $pid;

/**
* ID of the process.
*
* In a Swoole program (e.g., a Swoole-based server), there are different types of processes, including event worker
* processes, task worker processes, and user worker processes. This ID is to uniquely identify the process in the
* running Swoole program.
*
* @var int
*/
public $id;

private $callback;
Expand Down
4 changes: 3 additions & 1 deletion src/swoole/Swoole/Server.php
Original file line number Diff line number Diff line change
Expand Up @@ -467,9 +467,11 @@ public function connection_list($start_fd, $find_count = null)
public function sendMessage($message, $dst_worker_id)
{
}

/**
* @param \Swoole\Process $process
* @return int
* @return int|false Return the ID of the process (\Swoole\Process::$id) back if succeeds; otherwise return FALSE.
* @see \Swoole\Process::$id
*/
public function addProcess(Process $process)
{
Expand Down

0 comments on commit 05c2ab9

Please sign in to comment.