diff options
| author | LemonBoy <thatlemon@gmail.com> | 2021-02-28 10:01:55 +0100 |
|---|---|---|
| committer | LemonBoy <thatlemon@gmail.com> | 2021-02-28 14:03:19 +0100 |
| commit | 566adc2510859eaa30eb7c318260c98e712daccf (patch) | |
| tree | 963d59321381ff91148c356ba761dcb5c246cf2f /lib/std/net | |
| parent | e65b6d99ac38686228bf5b5b9c1121382e05da4b (diff) | |
| download | zig-566adc2510859eaa30eb7c318260c98e712daccf.tar.gz zig-566adc2510859eaa30eb7c318260c98e712daccf.zip | |
std: Swap arguments in Thread.spawn
Beside the new order being consistent with the ThreadPool API and making
more sense, this shuffling allows to write the context argument type in
terms of the startFn arguments, reducing the use of anytype (eg. less
explicit casts when using comptime_int parameters, yay).
Sorry for the breakage.
Closes #8082
Diffstat (limited to 'lib/std/net')
| -rw-r--r-- | lib/std/net/test.zig | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/std/net/test.zig b/lib/std/net/test.zig index 10a9c4e18b..4470d17aeb 100644 --- a/lib/std/net/test.zig +++ b/lib/std/net/test.zig @@ -161,7 +161,7 @@ test "listen on a port, send bytes, receive bytes" { } }; - const t = try std.Thread.spawn(server.listen_address, S.clientFn); + const t = try std.Thread.spawn(S.clientFn, server.listen_address); defer t.wait(); var client = try server.accept(); @@ -285,7 +285,7 @@ test "listen on a unix socket, send bytes, receive bytes" { } }; - const t = try std.Thread.spawn({}, S.clientFn); + const t = try std.Thread.spawn(S.clientFn, {}); defer t.wait(); var client = try server.accept(); |
