| ... | @@ -542,10 +542,10 @@ test "Condition - broadcasting" { | ... | @@ -542,10 +542,10 @@ test "Condition - broadcasting" { |
| 542 | // Wait for all the broadcast threads to spawn. | 542 | // Wait for all the broadcast threads to spawn. |
| 543 | // timedWait() to detect any potential deadlocks. | 543 | // timedWait() to detect any potential deadlocks. |
| 544 | while (broadcast_test.count != num_threads) { | 544 | while (broadcast_test.count != num_threads) { |
| 545 | try broadcast_test.completed.timedWait( | 545 | broadcast_test.completed.timedWait( |
| 546 | &broadcast_test.mutex, | 546 | &broadcast_test.mutex, |
| 547 | 1 * std.time.ns_per_s, | 547 | 1 * std.time.ns_per_s, |
| 548 | ); | 548 | ) catch {}; |
| 549 | } | 549 | } |
| 550 | | 550 | |
| 551 | // Reset the counter and wake all the threads to exit. | 551 | // Reset the counter and wake all the threads to exit. |
| ... | @@ -589,7 +589,7 @@ test "Condition - broadcasting - wake all threads" { | ... | @@ -589,7 +589,7 @@ test "Condition - broadcasting - wake all threads" { |
| 589 | } | 589 | } |
| 590 | | 590 | |
| 591 | while (self.thread_id_to_wake != thread_id) { | 591 | while (self.thread_id_to_wake != thread_id) { |
| 592 | self.cond.timedWait(&self.mutex, 1 * std.time.ns_per_s) catch std.debug.panic("thread_id {d} timeout {d}", .{ thread_id, self.thread_id_to_wake }); | 592 | self.cond.timedWait(&self.mutex, 1 * std.time.ns_per_s) catch {}; |
| 593 | self.wakeups += 1; | 593 | self.wakeups += 1; |
| 594 | } | 594 | } |
| 595 | if (self.thread_id_to_wake <= num_threads) { | 595 | if (self.thread_id_to_wake <= num_threads) { |
| ... | @@ -614,10 +614,10 @@ test "Condition - broadcasting - wake all threads" { | ... | @@ -614,10 +614,10 @@ test "Condition - broadcasting - wake all threads" { |
| 614 | // Wait for all the broadcast threads to spawn. | 614 | // Wait for all the broadcast threads to spawn. |
| 615 | // timedWait() to detect any potential deadlocks. | 615 | // timedWait() to detect any potential deadlocks. |
| 616 | while (broadcast_test.count != num_threads) { | 616 | while (broadcast_test.count != num_threads) { |
| 617 | try broadcast_test.completed.timedWait( | 617 | broadcast_test.completed.timedWait( |
| 618 | &broadcast_test.mutex, | 618 | &broadcast_test.mutex, |
| 619 | 1 * std.time.ns_per_s, | 619 | 1 * std.time.ns_per_s, |
| 620 | ); | 620 | ) catch {}; |
| 621 | } | 621 | } |
| 622 | | 622 | |
| 623 | // Signal thread 1 to wake up | 623 | // Signal thread 1 to wake up |