| ... | @@ -1229,7 +1229,19 @@ pub fn init( | ... | @@ -1229,7 +1229,19 @@ pub fn init( |
| 1229 | gpa: Allocator, | 1229 | gpa: Allocator, |
| 1230 | options: InitOptions, | 1230 | options: InitOptions, |
| 1231 | ) Threaded { | 1231 | ) Threaded { |
| 1232 | if (builtin.single_threaded) return .init_single_threaded; | 1232 | if (builtin.single_threaded) return .{ |
| | 1233 | .allocator = gpa, |
| | 1234 | .stack_size = options.stack_size, |
| | 1235 | .async_limit = options.async_limit orelse init_single_threaded.async_limit, |
| | 1236 | .cpu_count_error = init_single_threaded.cpu_count_error, |
| | 1237 | .concurrent_limit = options.concurrent_limit, |
| | 1238 | .old_sig_io = undefined, |
| | 1239 | .old_sig_pipe = undefined, |
| | 1240 | .have_signal_handler = init_single_threaded.have_signal_handler, |
| | 1241 | .argv0 = options.argv0, |
| | 1242 | .environ = .{ .process_environ = options.environ }, |
| | 1243 | .worker_threads = init_single_threaded.worker_threads, |
| | 1244 | }; |
| 1233 | | 1245 | |
| 1234 | const cpu_count = std.Thread.getCpuCount(); | 1246 | const cpu_count = std.Thread.getCpuCount(); |
| 1235 | | 1247 | |
| ... | @@ -1243,8 +1255,8 @@ pub fn init( | ... | @@ -1243,8 +1255,8 @@ pub fn init( |
| 1243 | .old_sig_pipe = undefined, | 1255 | .old_sig_pipe = undefined, |
| 1244 | .have_signal_handler = false, | 1256 | .have_signal_handler = false, |
| 1245 | .argv0 = options.argv0, | 1257 | .argv0 = options.argv0, |
| 1246 | .worker_threads = .init(null), | | |
| 1247 | .environ = .{ .process_environ = options.environ }, | 1258 | .environ = .{ .process_environ = options.environ }, |
| | 1259 | .worker_threads = .init(null), |
| 1248 | }; | 1260 | }; |
| 1249 | | 1261 | |
| 1250 | if (posix.Sigaction != void) { | 1262 | if (posix.Sigaction != void) { |