diff --git a/src/bundler/bundle_v2.zig b/src/bundler/bundle_v2.zig index 260b82c24244d5..eb9fce20fc70b8 100644 --- a/src/bundler/bundle_v2.zig +++ b/src/bundler/bundle_v2.zig @@ -156,12 +156,7 @@ pub const ThreadPool = struct { if (existing_thread_pool) |pool| { this.pool = pool; } else { - const cpu_count = bun.getThreadCount(); - this.pool = try v2.graph.allocator.create(ThreadPoolLib); - this.pool.* = ThreadPoolLib.init(.{ - .max_threads = cpu_count, - }); - debug("{d} workers", .{cpu_count}); + this.pool = JSC.WorkPool.get(); } this.pool.warm(8);