Locking allocations

It is only threadsafe if you using threadsafe allocator like std.heap.GeneralPurposeAllocator and std.heap.c_allocator.
Almost every other allocator in std is not threadsafe.

Also std.heap.GeneralPurposeAllocator can be configured to be not thread safe.

2 Likes