12#include <userver/dist_lock/dist_lock_settings.hpp>
13#include <userver/dist_lock/dist_lock_strategy.hpp>
14#include <userver/engine/task/task_base.hpp>
15#include <userver/engine/task/task_processor_fwd.hpp>
17USERVER_NAMESPACE_BEGIN
48class DistLockedTask
final :
public engine::
TaskBase {
50 using WorkerFunc = std::function<
void()>;
56 DistLockedTask(DistLockedTask&&) =
delete;
57 DistLockedTask& operator=(DistLockedTask&&) =
delete;
59 DistLockedTask(
const DistLockedTask&) =
delete;
60 DistLockedTask& operator=(
const DistLockedTask&&) =
delete;
82 WorkerFunc worker_func,
92 void Get()
noexcept(
false);
95 DistLockedTask(engine::TaskProcessor&, std::shared_ptr<impl::Locker>,
98 std::shared_ptr<impl::Locker> locker_ptr_;