mirror of
https://github.com/ziglang/zig.git
synced 2025-12-06 06:13:07 +00:00
std.Io.Threaded: allow calling init in single-threaded mode
This commit is contained in:
parent
b4ec78906c
commit
aae85a4130
@ -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,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user