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 |
|
} |
Is there a good reason that
SmpAllocatorasserts 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 🤷
zig/lib/std/heap/SmpAllocator.zig
Lines 113 to 115 in db622f1