std.Io.Threaded: allow calling init in single-threaded mode

This commit is contained in:
Andrew Kelley 2025-11-21 09:08:37 -08:00
parent b4ec78906c
commit aae85a4130

View file

@ -103,7 +103,7 @@ pub fn init(
/// here. /// here.
gpa: Allocator, gpa: Allocator,
) Threaded { ) Threaded {
assert(!builtin.single_threaded); // use 'init_single_threaded' instead if (builtin.single_threaded) return .init_single_threaded;
var t: Threaded = .{ var t: Threaded = .{
.allocator = gpa, .allocator = gpa,