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 {
103
103
config .zig_lib_dir = .{ .handle = .{ .fd = zig_lib_dir_fd }, .path = "/lib" };
104
104
}
105
105
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 ();
115
109
116
110
var ip : InternPool = try .init (gpa );
117
111
defer ip .deinit (gpa );
@@ -122,7 +116,7 @@ pub fn main() Error!void {
122
116
var document_store : zls.DocumentStore = .{
123
117
.allocator = gpa ,
124
118
.config = config ,
125
- .thread_pool = if ( builtin . single_threaded ) {} else & thread_pool ,
119
+ .thread_pool = & thread_pool ,
126
120
.diagnostics_collection = & diagnostics_collection ,
127
121
};
128
122
defer document_store .deinit ();
You can’t perform that action at this time.
0 commit comments