mirror of
https://codeberg.org/ziglang/zig.git
synced 2025-12-06 05:44:20 +00:00
std.Io.Threaded: allow calling init in single-threaded mode
This commit is contained in:
parent
b4ec78906c
commit
aae85a4130
1 changed files with 1 additions and 1 deletions
|
|
@ -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,
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue