We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a57cf47 commit 3dd728aCopy full SHA for 3dd728a
src/bundler/bundle_v2.zig
@@ -153,20 +153,8 @@ pub const ThreadPool = struct {
153
154
pub fn start(this: *ThreadPool, v2: *BundleV2, existing_thread_pool: ?*ThreadPoolLib) !void {
155
this.v2 = v2;
156
-
157
- if (existing_thread_pool) |pool| {
158
- this.pool = pool;
159
- } else {
160
- const cpu_count = bun.getThreadCount();
161
- this.pool = try v2.graph.allocator.create(ThreadPoolLib);
162
- this.pool.* = ThreadPoolLib.init(.{
163
- .max_threads = cpu_count,
164
- });
165
- debug("{d} workers", .{cpu_count});
166
- }
167
+ this.pool = existing_thread_pool orelse JSC.WorkPool.get();
168
this.pool.warm(8);
169
170
this.pool.setThreadContext(this);
171
}
172
0 commit comments