File tree Expand file tree Collapse file tree 1 file changed +4
-10
lines changed Expand file tree Collapse file tree 1 file changed +4
-10
lines changed Original file line number Diff line number Diff line change @@ -103,15 +103,9 @@ pub fn main() Error!void {
103103 config .zig_lib_dir = .{ .handle = .{ .fd = zig_lib_dir_fd }, .path = "/lib" };
104104 }
105105
106- var thread_pool : if (builtin .single_threaded ) void else std.Thread.Pool = undefined ;
107- if (builtin .single_threaded ) {
108- thread_pool = {};
109- } else {
110- thread_pool .init (.{
111- .allocator = gpa ,
112- }) catch std .debug .panic ("failed to initalize thread pool" , .{});
113- }
114- defer if (! builtin .single_threaded ) thread_pool .deinit ();
106+ var thread_pool : std.Thread.Pool = undefined ;
107+ thread_pool .init (.{ .allocator = gpa }) catch std .debug .panic ("failed to initalize thread pool" , .{});
108+ defer thread_pool .deinit ();
115109
116110 var ip : InternPool = try .init (gpa );
117111 defer ip .deinit (gpa );
@@ -122,7 +116,7 @@ pub fn main() Error!void {
122116 var document_store : zls.DocumentStore = .{
123117 .allocator = gpa ,
124118 .config = config ,
125- .thread_pool = if ( builtin . single_threaded ) {} else & thread_pool ,
119+ .thread_pool = & thread_pool ,
126120 .diagnostics_collection = & diagnostics_collection ,
127121 };
128122 defer document_store .deinit ();
You can’t perform that action at this time.
0 commit comments