aboutsummaryrefslogtreecommitdiffstats
path: root/staging_vespalib/src/vespa/vespalib/util/isequencedtaskexecutor.cpp
blob: af3ce5fe64f0abd1922acbccb621d6af49747d55 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// Copyright 2020 Oath inc.. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.

#include "isequencedtaskexecutor.h"
#include <vespa/vespalib/stllike/hash_fun.h>

namespace vespalib {

ISequencedTaskExecutor::ISequencedTaskExecutor(uint32_t numExecutors)
    : _numExecutors(numExecutors)
{
}

ISequencedTaskExecutor::~ISequencedTaskExecutor() = default;

ISequencedTaskExecutor::ExecutorId
ISequencedTaskExecutor::getExecutorIdFromName(vespalib::stringref componentId) const {
    vespalib::hash<vespalib::stringref> hashfun;
    return getExecutorId(hashfun(componentId));
}

}