diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2023-02-19 10:10:59 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-02-19 10:10:59 -0500 |
| commit | 0bb178bbb2451238a326c6e916ecf38fbc34cab1 (patch) | |
| tree | b2499481c929ba1497d6eef8b85cc46205f953ab /lib/std/Thread/Semaphore.zig | |
| parent | 346ec15c5005e523c2a1d4b967ee7a4e5d1e9775 (diff) | |
| parent | 5fc6bbe71eeecb195d2cda2a2522e7fd04749d5b (diff) | |
| download | zig-0bb178bbb2451238a326c6e916ecf38fbc34cab1.tar.gz zig-0bb178bbb2451238a326c6e916ecf38fbc34cab1.zip | |
Merge pull request #14671 from ziglang/multi-object-for
implement multi-object for loops
Diffstat (limited to 'lib/std/Thread/Semaphore.zig')
| -rw-r--r-- | lib/std/Thread/Semaphore.zig | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/std/Thread/Semaphore.zig b/lib/std/Thread/Semaphore.zig index 72191ffd6f..1b182d4c2a 100644 --- a/lib/std/Thread/Semaphore.zig +++ b/lib/std/Thread/Semaphore.zig @@ -54,7 +54,7 @@ test "Thread.Semaphore" { var n: i32 = 0; var ctx = TestContext{ .sem = &sem, .n = &n }; - for (threads) |*t| t.* = try std.Thread.spawn(.{}, TestContext.worker, .{&ctx}); + for (&threads) |*t| t.* = try std.Thread.spawn(.{}, TestContext.worker, .{&ctx}); for (threads) |t| t.join(); sem.wait(); try testing.expect(n == num_threads); |
