AsyncPool: Slightly reduce worker memory usage with more conservative start options

this results in a memory footprint reduction of maybe 4MB for a total of 8 workers. Not much, but it's something.
This commit is contained in:
Dylan K. Taylor
2018-06-10 10:18:07 +01:00
parent f3a84b332b
commit 3725bea3e5
4 changed files with 32 additions and 13 deletions

View File

@ -634,4 +634,21 @@ class Utils{
return array_combine($matches[1], array_map("trim", $matches[2]));
}
/**
* @param int $severity
* @param string $message
* @param string $file
* @param int $line
*
* @return bool
* @throws \ErrorException
*/
public static function errorExceptionHandler(int $severity, string $message, string $file, int $line) : bool{
if(error_reporting() & $severity){
throw new \ErrorException($message, 0, $severity, $file, $line);
}
return true; //stfu operator
}
}