\TamerLib\tm > wait() no longer throws a TimeoutException, the function will simply return when the timeout is reached.

This commit is contained in:
Netkas 2023-07-09 11:48:25 -04:00
parent ba82426e32
commit eaa9887150
No known key found for this signature in database
GPG key ID: 5DAF58535614062B
2 changed files with 9 additions and 3 deletions

View file

@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [2.1.2] - 2023-07-09
### Changed
- `\TamerLib\tm > wait()` no longer throws a TimeoutException, the function will simply return when the timeout is
reached.
## [2.1.1] - 2023-07-07
### Fixed

View file

@ -456,7 +456,6 @@
* @throws JobManagerException If the JobManager throws an exception
* @throws TamerException If the Tamer throws an exception
* @throws Throwable If a job fails
* @throws TimeoutException If the timeout is reached
*/
public static function wait(int $timeout=0): void
{
@ -548,12 +547,12 @@
if ($timeout < 0)
{
throw new TimeoutException('wait() timed out');
return;
}
if($timeout > 0 && (time() - $time_start) >= $timeout)
{
throw new TimeoutException('wait() timed out');
return;
}
usleep(1000);