diff options
Diffstat (limited to 'staging_vespalib/src/vespa/vespalib/util/scheduledexecutor.cpp')
-rw-r--r-- | staging_vespalib/src/vespa/vespalib/util/scheduledexecutor.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/staging_vespalib/src/vespa/vespalib/util/scheduledexecutor.cpp b/staging_vespalib/src/vespa/vespalib/util/scheduledexecutor.cpp index d9b4feda293..3f5b3b79656 100644 --- a/staging_vespalib/src/vespa/vespalib/util/scheduledexecutor.cpp +++ b/staging_vespalib/src/vespa/vespalib/util/scheduledexecutor.cpp @@ -45,7 +45,7 @@ ScheduledExecutor::ScheduledExecutor() ScheduledExecutor::~ScheduledExecutor() { - vespalib::LockGuard guard(_lock); + std::lock_guard guard(_lock); _transport->ShutDown(true); _threadPool.Close(); _taskList.clear(); @@ -55,7 +55,7 @@ ScheduledExecutor::~ScheduledExecutor() void ScheduledExecutor::scheduleAtFixedRate(vespalib::Executor::Task::UP task, duration delay, duration interval) { - vespalib::LockGuard guard(_lock); + std::lock_guard guard(_lock); TimerTaskPtr tTask(new TimerTask(_transport->GetScheduler(), std::move(task), interval)); _taskList.push_back(std::move(tTask)); _taskList.back()->Schedule(to_s(delay)); @@ -64,10 +64,10 @@ ScheduledExecutor::scheduleAtFixedRate(vespalib::Executor::Task::UP task, durati void ScheduledExecutor::reset() { - vespalib::LockGuard guard(_lock); + std::lock_guard guard(_lock); _transport->ShutDown(true); _taskList.clear(); - _transport.reset(new FNET_Transport()); + _transport = std::make_unique<FNET_Transport>(); _transport->Start(&_threadPool); } |