sandbox.cpp

src/core/sandbox.cpp

@file sandbox.cpp @brief SandboxManager and ScopedSandbox implementation.

Owners: @tvanfossen

next_delegation_id

std::string entropic::SandboxManager::next_delegation_id(const std::string &prefix)

Mint a sandbox id that no sibling delegation can collide with.

src/core/sandbox.cpp:618

Source · 4 lines
std::string SandboxManager::next_delegation_id(const std::string& prefix) {
    auto n = id_seq_.fetch_add(1, std::memory_order_relaxed) + 1;
    return prefix + "_" + std::to_string(n);
}
Activity · 2 steps
lines 619–619auto n = id_seq_.fetch_add(1, std::memory_order_relaxed) + 1;lines 620–620return prefix + "_" + std::to_string(n);

Requirements

REQ-DELEG-005