Skip to main content

Module create_token

Module create_token 

Source
Expand description

Source: Common/src/TimeTrace.cpp:115-123 (hand-ported) C++:

uint16_t createToken(GlobalContext& context, const char* name, const char* category)
{
    std::scoped_lock lock(context.mutex);
    LUAU_ASSERT(context.tokens.size() < 64 * 1024);
    context.tokens.push_back({name, category});
    return uint16_t(context.tokens.size() - 1);
}

Functionsยง

create_token