Many changes.
This commit is contained in:
parent
dc02826079
commit
13ad2b0ef8
15 changed files with 148 additions and 178 deletions
|
@ -164,7 +164,7 @@
|
|||
}
|
||||
catch(Exception $e)
|
||||
{
|
||||
throw new ServerException('Failed to initialize the server.', 0, $e);
|
||||
throw new ServerException('Failed to initialize the server.', $e);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -228,7 +228,7 @@
|
|||
*/
|
||||
public static function monitor(int $timeout=0): void
|
||||
{
|
||||
if($timeout > 0)
|
||||
if($timeout > 0 || $timeout === -1)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
@ -293,6 +293,7 @@
|
|||
self::$supervisor->spawnWorker($path, $count, $channel);
|
||||
}
|
||||
|
||||
var_dump('monitoring');
|
||||
self::monitor(-1);
|
||||
}
|
||||
|
||||
|
@ -302,9 +303,9 @@
|
|||
* @param string $function
|
||||
* @param array $arguments
|
||||
* @param int $channel
|
||||
* @return mixed
|
||||
* @return int
|
||||
*/
|
||||
public static function do(string $function, array $arguments, int $channel=0): mixed
|
||||
public static function do(string $function, array $arguments, int $channel=0): int
|
||||
{
|
||||
if(self::$mode !== TamerMode::CLIENT)
|
||||
{
|
||||
|
@ -558,11 +559,11 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* Invokes the call() function, returns the Job ID.
|
||||
* Invokes the do() function, returns the Job ID.
|
||||
*
|
||||
* @param string $name
|
||||
* @param array $arguments
|
||||
* @return mixed
|
||||
* @return int
|
||||
*/
|
||||
public static function __callStatic(string $name, array $arguments)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue