Files
scylladb/tasks/types.hh
Avi Kivity 0ae22a09d4 LICENSE: Update to version 1.1
Updated terms of non-commercial use (must be a never-customer).
2026-04-12 19:46:33 +03:00

30 lines
532 B
C++

/*
* Copyright (C) 2022-present ScyllaDB
*/
/*
* SPDX-License-Identifier: LicenseRef-ScyllaDB-Source-Available-1.1
*/
#pragma once
#include "utils/UUID.hh"
namespace tasks {
using task_id = utils::tagged_uuid<struct task_id_tag>;
struct task_info {
task_id id;
unsigned shard;
task_info() noexcept : id(task_id::create_null_id()), shard(0) {}
task_info(task_id id, unsigned parent_shard) noexcept : id(id), shard(parent_shard) {}
operator bool() const noexcept {
return bool(id);
}
};
}