+ /**
+ * The current ID of the process
+ *
+ * @var int
+ */
+ private $pid;
+
+ /**
+ * @param null|int $pid The Id of the current process (null means determine automatically)
+ */
+ public function __construct($pid = null)
+ {
+ $this->pid = isset($pid) ? $pid : getmypid();
+ }
+