From ce905b99c01b90dc9271bdf562a8c5b28fb46c27 Mon Sep 17 00:00:00 2001 From: Stefan Kroboth Date: Tue, 27 Feb 2024 16:21:25 +0100 Subject: [PATCH] Mention new timeout feature in 0.10.0 release post --- CHANGELOG.md | 2 +- media/website/content/blog/version-v0.10.0.md | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index dd5eada70..df002a1a8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,13 +6,13 @@ 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) (since argmin version 0.5.0). ## [argmin unreleased] +* Added a new GUI observer called Spectator (`argmin-observer-spectator` and `spectator` packages) (@stefan-k, #311) ## [argmin-math unreleased] ## [argmin v0.10.0] 2024-02-27 ### Added -* Added a new GUI observer called Spectator (`argmin-observer-spectator` and `spectator` packages) (@stefan-k, #311) * Added optional timeout to Executor (@stefan-k, #405) ### Changed diff --git a/media/website/content/blog/version-v0.10.0.md b/media/website/content/blog/version-v0.10.0.md index 0e754d675..cb7251d10 100644 --- a/media/website/content/blog/version-v0.10.0.md +++ b/media/website/content/blog/version-v0.10.0.md @@ -46,6 +46,21 @@ Interrupt handling now includes `SIGINT`, `SIGTERM` and `SIGHUP`. Consequently, `TerminationReason::KeyboardInterrupt` was renamed to `TerminationReason::Interrupt`. This is a breaking change for those who match on `TerminationReason`. +##### Optional timeout + +`Executor` now allows one to terminate a run after a given timeout, which can be set with the `timeout` method of `Executor`. +The check whether the overall runtime exceeds the timeout is performed after every iteration, +therefore the actual runtime can be longer than the set timeout. +In case of timeout, the run terminates with `TerminationReason::Timeout`. + +The timeout is set via the `timeout` method of `Executor`: + +```rust +let res = Executor::new(operator, solver) + .timeout(std::time::Duration::from_secs(3)) + .run()?; +``` + ##### The optional `serde1` feature With moving observers out of the argmin crate, it became easier to reason about the optional