Skip to content

Commit 01af75f

Browse files
committed
updates for 0.12/0.13
1 parent f0b8e48 commit 01af75f

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

smac/src/smac_mt.zig

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
const std = @import("std");
22
const rnd_gen = std.rand.DefaultPrng;
33
const heap_alloc = std.heap.page_allocator;
4-
const stdout = std.io.getStdOut().writer();
4+
var stdout = std.io.getStdOut().writer(); //windows requires var Linux and Mac OS can do with const
55

66
pub fn main() !void {
77
const x = 4;
@@ -12,7 +12,8 @@ pub fn main() !void {
1212
while (i < x) : (i += 1) {
1313
list[i] = std.ArrayList(u8).init(heap_alloc);
1414
defer list[i].deinit();
15-
t[i] = try std.Thread.spawn(.{}, count_it, .{ @truncate(u32, i), &list[i] });
15+
//removed @as(i32, 1) because it's not needed since 0.13 and throws an error
16+
t[i] = try std.Thread.spawn(.{}, count_it, .{ i, &list[i] });
1617
}
1718

1819
//we join all te threads to wait till they're done counting
441 Bytes
Loading

0 commit comments

Comments
 (0)