From 9531a769e5872310cf5650c65fb61e42f83e3e83 Mon Sep 17 00:00:00 2001 From: Brian Kim Date: Wed, 25 Dec 2024 20:01:46 -0500 Subject: [PATCH] ensure that the v2 bundler uses the WorkPool\'s threadpool --- src/bundler/bundle_v2.zig | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) 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);