diff options
Diffstat (limited to '073wait.cc')
-rw-r--r-- | 073wait.cc | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/073wait.cc b/073wait.cc index 0d635cc3..e42df163 100644 --- a/073wait.cc +++ b/073wait.cc @@ -34,6 +34,11 @@ if (Passed && any_routines_waiting()) { Passed = false; raise << Current_scenario->name << ": deadlock!\n" << end(); } +:(before "End Run Routine") +if (any_routines_waiting()) { + raise << "deadlock!\n" << end(); + dump_waiting_routines(); +} :(before "End Test Teardown") if (Passed && any_routines_with_error()) { Passed = false; @@ -47,6 +52,12 @@ bool any_routines_waiting() { } return false; } +void dump_waiting_routines() { + for (int i = 0; i < SIZE(Routines); ++i) { + if (Routines.at(i)->state == WAITING) + cerr << i << ": " << routine_label(Routines.at(i)) << '\n'; + } +} //: primitive recipe to put routines in that state |