Skip to content

std.heap.SmpAllocator asserts !builtin.single_threaded #25992

@leecannon

Description

@leecannon

Is there a good reason that SmpAllocator asserts not single threaded other than a different implementation might be more efficient in a single threaded situation?

I tried deleting the comptime assert and the allocator worked fine 🤷

comptime {
assert(!builtin.single_threaded); // you're holding it wrong
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions