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.
gpa: Allocator,
) Threaded {
assert(!builtin.single_threaded); // use 'init_single_threaded' instead
if (builtin.single_threaded) return .init_single_threaded;
var t: Threaded = .{
.allocator = gpa,