Contur 2
Educational OS kernel simulator
Loading...
Searching...
No Matches
serial_dispatch_runtime.h
Go to the documentation of this file.
1
3
4#pragma once
5
6#include <memory>
7
9
10namespace contur {
11
14 {
15 public:
19
22
25
30
33
35 [[nodiscard]] std::string_view name() const noexcept override;
36
38 [[nodiscard]] const HostThreadingConfig &config() const noexcept override;
39
41 [[nodiscard]] Result<void> dispatch(const DispatcherLanes &lanes, std::size_t tickBudget) override;
42
44 void tick(const DispatcherLanes &lanes) override;
45
46 private:
47 struct Impl;
48 std::unique_ptr<Impl> impl_;
49 };
50
51} // namespace contur
Strategy interface that executes dispatch/tick across dispatcher lanes.
A result type that holds either a success value of type T or an ErrorCode.
Definition error.h:104
SerialDispatchRuntime(SerialDispatchRuntime &&) noexcept
Move-constructs serial runtime state.
SerialDispatchRuntime(HostThreadingConfig config={})
Constructs serial runtime with runtime-owned config.
const HostThreadingConfig & config() const noexcept override
Returns runtime-owned threading config.
std::string_view name() const noexcept override
Returns runtime implementation name.
~SerialDispatchRuntime() override
Destroys serial runtime.
void tick(const DispatcherLanes &lanes) override
Ticks all lanes serially.
Result< void > dispatch(const DispatcherLanes &lanes, std::size_t tickBudget) override
Runs one serial dispatch pass across all lanes.
SerialDispatchRuntime & operator=(const SerialDispatchRuntime &)=delete
Copy assignment is disabled.
SerialDispatchRuntime(const SerialDispatchRuntime &)=delete
Copy construction is disabled.
Runtime strategy interface for dispatching across dispatcher lanes.
Definition block.h:15
std::vector< std::reference_wrapper< IDispatcher > > DispatcherLanes
Alias for the dispatcher lanes controlled by a runtime.
Configuration for host-thread dispatch runtime behavior.