\TamerLib\tm > wait()
no longer throws a TimeoutException, the function will simply return when the timeout is reached.
This commit is contained in:
parent
ba82426e32
commit
eaa9887150
2 changed files with 9 additions and 3 deletions
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue