Skip to content

Commit

Permalink
move state dequeue prior to error check in explore()
Browse files Browse the repository at this point in the history
The bail out condition will soon need to ask about the state depth as well.

Github: related to #131 "minimal trace mode"
  • Loading branch information
Smattr committed Jun 16, 2019
1 parent 1c8cb06 commit 963ccbb
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions rumur/src/generate-model.cc
Original file line number Diff line number Diff line change
Expand Up @@ -797,14 +797,14 @@ void generate_model(std::ostream &out, const Model &m) {
<< "\n"
<< " for (;;) {\n"
<< "\n"
<< " if (THREADS > 1 && __atomic_load_n(&error_count,\n"
<< " __ATOMIC_SEQ_CST) >= MAX_ERRORS) {\n"
<< " /* Another thread found an error. */\n"
<< " const struct state *s = queue_dequeue(&queue_id);\n"
<< " if (s == NULL) {\n"
<< " break;\n"
<< " }\n"
<< "\n"
<< " const struct state *s = queue_dequeue(&queue_id);\n"
<< " if (s == NULL) {\n"
<< " if (THREADS > 1 && __atomic_load_n(&error_count,\n"
<< " __ATOMIC_SEQ_CST) >= MAX_ERRORS) {\n"
<< " /* Another thread found an error. */\n"
<< " break;\n"
<< " }\n"
<< "\n"
Expand Down

0 comments on commit 963ccbb

Please sign in to comment.