Many changes.

This commit is contained in:
Netkas 2023-06-16 03:38:51 -04:00
parent dc02826079
commit 13ad2b0ef8
No known key found for this signature in database
GPG key ID: 5DAF58535614062B
15 changed files with 148 additions and 178 deletions

View file

@ -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)
{