mirror of
https://codeberg.org/ziglings/exercises.git
synced 2025-11-05 05:05:36 +00:00
Merge pull request 'pause slightly extended for faster computers' (#317) from new_io_2 into main
Reviewed-on: https://codeberg.org/ziglings/exercises/pulls/317
This commit is contained in:
commit
56b220e98d
|
|
@ -106,7 +106,7 @@ pub fn main() !void {
|
||||||
|
|
||||||
// After the threads have been started,
|
// After the threads have been started,
|
||||||
// they run in parallel and we can still do some work in between.
|
// they run in parallel and we can still do some work in between.
|
||||||
std.posix.nanosleep(1, 0);
|
std.posix.nanosleep(4, 0);
|
||||||
std.debug.print("Some weird stuff, after starting the threads.\n", .{});
|
std.debug.print("Some weird stuff, after starting the threads.\n", .{});
|
||||||
}
|
}
|
||||||
// After we have left the closed area, we wait until
|
// After we have left the closed area, we wait until
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
--- exercises/104_threading.zig 2025-11-01 15:37:31.299815135 +0100
|
--- exercises/104_threading.zig 2025-11-01 15:54:27.074988112 +0100
|
||||||
+++ answers/104_threading.zig 2025-11-01 15:39:28.774262735 +0100
|
+++ answers/104_threading.zig 2025-11-01 15:56:12.852195135 +0100
|
||||||
@@ -97,16 +97,16 @@
|
@@ -97,12 +97,12 @@
|
||||||
defer handle.join();
|
defer handle.join();
|
||||||
|
|
||||||
// Second thread
|
// Second thread
|
||||||
|
|
@ -15,8 +15,3 @@
|
||||||
|
|
||||||
// After the threads have been started,
|
// After the threads have been started,
|
||||||
// they run in parallel and we can still do some work in between.
|
// they run in parallel and we can still do some work in between.
|
||||||
- std.posix.nanosleep(1, 0);
|
|
||||||
+ std.posix.nanosleep(4, 0);
|
|
||||||
std.debug.print("Some weird stuff, after starting the threads.\n", .{});
|
|
||||||
}
|
|
||||||
// After we have left the closed area, we wait until
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user