Skip to main content

ClikaRT::runtime::Executor

class

Header: ClikaRT/runtime/executor.h

ClikaRT::runtime::Executor: drives ONE Model node; admits requests, runs its phases (continuous-batched across sessions), and delivers results. This is the single-node engine; a multi-node ensemble is a Pipeline. The executor does NOT own the model; keep the Model alive for the executor's lifetime. Opaque handle (move-only).

Drives ONE Model: admits requests, runs its phases (continuous-batched across sessions), and delivers results.

The single-node engine (Pipeline is the multi-node ensemble). Does NOT own the model; keep the Model alive for the executor's lifetime. Move-only handle; shutdown() drains in-flight work.

auto ex = ClikaRT::runtime::Executor::create(model);
auto sid = ex.enqueue(std::move(request));
auto out = ex.await(sid);

Static member functions

create()

static Executor create(Model& model, ExecConfig config = {})

Build an executor bound to model (borrowed; must outlive the executor). Uses the built-in continuous batcher + FIFO scheduler, tuned by config. detail::contain wraps the model's overrides here, in your translation unit, so a throw from one is caught caller-side and fails the session; it never unwinds into the engine.

Declared in ClikaRT/runtime/executor.h, line 42

Member functions

Executor()

Executor(Executor&& other) noexcept

Declared in ClikaRT/runtime/executor.h, line 44

operator=()

Executor& operator=(Executor&& other) noexcept

Move-only handle; the moved-from object is empty.

Declared in ClikaRT/runtime/executor.h, line 46

~Executor()

~Executor()

Implicitly shuts down and releases the engine.

Declared in ClikaRT/runtime/executor.h, line 48

enqueue()

SessionId enqueue(Request request)

Submit a request; returns its session handle. Non-blocking.

Declared in ClikaRT/runtime/executor.h, line 52

await()

Response await(SessionId session)

Block until session completes; return its final response.

Declared in ClikaRT/runtime/executor.h, line 57

cancel()

void cancel(SessionId session)

Cooperatively cancel an in-flight session.

Declared in ClikaRT/runtime/executor.h, line 61

shutdown()

void shutdown()

Drain in-flight work and stop. When shutdown() returns, every accepted session has completed and await() still returns its result. A later enqueue() is refused with an InvalidArgument-status error whose code_name() is "FAILED_PRECONDITION".

Declared in ClikaRT/runtime/executor.h, line 68