made item_allocator threadsafe