@@ -255,7 +255,7 @@ |
||
255 | 255 | * @param mixed $args |
256 | 256 | * @param string $tag |
257 | 257 | * @param \Ackintosh\Snidel\Token $token |
258 | - * @return void |
|
258 | + * @return integer |
|
259 | 259 | * @throws \RuntimeException |
260 | 260 | */ |
261 | 261 | public function forkSimply($callable, $args = array(), $tag = null, Token $token = null) |
@@ -11,6 +11,9 @@ |
||
11 | 11 | private $queuedCount = 0; |
12 | 12 | private $dequeuedCount = 0; |
13 | 13 | |
14 | + /** |
|
15 | + * @param integer $ownerPid |
|
16 | + */ |
|
14 | 17 | public function __construct($ownerPid) |
15 | 18 | { |
16 | 19 | $this->ownerPid = $ownerPid; |
@@ -50,15 +50,15 @@ |
||
50 | 50 | } |
51 | 51 | $pid = getmypid(); |
52 | 52 | switch (true) { |
53 | - case $this->ownerPid === $pid: |
|
54 | - $role = 'owner'; |
|
55 | - break; |
|
56 | - case $this->masterPid !== null && $this->masterPid === $pid: |
|
57 | - $role = 'master'; |
|
58 | - break; |
|
59 | - default: |
|
60 | - $role = 'worker'; |
|
61 | - break; |
|
53 | + case $this->ownerPid === $pid: |
|
54 | + $role = 'owner'; |
|
55 | + break; |
|
56 | + case $this->masterPid !== null && $this->masterPid === $pid: |
|
57 | + $role = 'master'; |
|
58 | + break; |
|
59 | + default: |
|
60 | + $role = 'worker'; |
|
61 | + break; |
|
62 | 62 | } |
63 | 63 | fputs( |
64 | 64 | $this->destination, |
@@ -11,6 +11,9 @@ |
||
11 | 11 | private $queuedCount = 0; |
12 | 12 | private $dequeuedCount = 0; |
13 | 13 | |
14 | + /** |
|
15 | + * @param integer $ownerPid |
|
16 | + */ |
|
14 | 17 | public function __construct($ownerPid) |
15 | 18 | { |
16 | 19 | $this->ownerPid = $ownerPid; |