From 43530a51c1caba3e403eea7ab8e025814fc3eb0a 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 de8fa8ebe503a8..e09a4ce95240d3 100644 --- a/src/bundler/bundle_v2.zig +++ b/src/bundler/bundle_v2.zig @@ -157,12 +157,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);