diff options
| author | arkady-e1ppa <[email protected]> | 2024-05-25 14:45:48 +0300 |
|---|---|---|
| committer | arkady-e1ppa <[email protected]> | 2024-05-25 14:55:17 +0300 |
| commit | 583af11cf703cccf01c0139eca58bef0d745d9d4 (patch) | |
| tree | 9786f73d768a2c4aea3231b299f43d60690a3f78 | |
| parent | e728ca9a8c24962048e32fea61a43a1b00d1c654 (diff) | |
Add comment description of RetryingPeriodicExecutor
8e86593b9c64d8eafc1f7a257d24e5b007f98a9a
| -rw-r--r-- | yt/yt/core/concurrency/retrying_periodic_executor.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/yt/yt/core/concurrency/retrying_periodic_executor.h b/yt/yt/core/concurrency/retrying_periodic_executor.h index 6cb6d36a3ea..a67d65feb2e 100644 --- a/yt/yt/core/concurrency/retrying_periodic_executor.h +++ b/yt/yt/core/concurrency/retrying_periodic_executor.h @@ -66,10 +66,23 @@ private: //////////////////////////////////////////////////////////////////////////////// +// Periodically executes callback which can fail using retries. Speciffics: +// Fallible callback is modelled as TCallback<TError()> +// Any non-Ok error is considered a failure. +// Retries are made with exponential backoff see yt/yt/core/misc/backoff_strategy.h . class TRetryingPeriodicExecutor : public NDetail::TPeriodicExecutorBase<NDetail::TRetryingInvocationTimePolicy> { public: + //! Initializes an instance. + /*! + * \note + * We must call #Start to activate the instance. + * + * \param invoker Invoker used for wrapping actions. + * \param callback Callback<TError()> to invoke periodically. + * \param options Period, splay, etc. and backoff options + */ TRetryingPeriodicExecutor( IInvokerPtr invoker, TPeriodicCallback callback, |
