aboutsummaryrefslogtreecommitdiffstats
path: root/searchcore/src/vespa/searchcore/proton/test/mock_shared_threading_service.cpp
blob: 7a17151fb77b721d596da579e3525a5a3c3abc54 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.

#include "mock_shared_threading_service.h"
#include <vespa/vespalib/util/sequencedtaskexecutor.h>

VESPA_THREAD_STACK_TAG(mock_field_writer_executor)

namespace proton {

MockSharedThreadingService::MockSharedThreadingService(ThreadExecutor& warmup_in,
                                                       ThreadExecutor& shared_in,
                                                       size_t num_bucket_executors)
    : _warmup(warmup_in),
      _shared(shared_in),
      _field_writer(vespalib::SequencedTaskExecutor::create(mock_field_writer_executor, 1)),
      _invokeService(10ms),
      _transport(),
      _bucket_executor(num_bucket_executors),
      _clock(_invokeService.nowRef())
{
}

MockSharedThreadingService::~MockSharedThreadingService() = default;

}