We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 66a3d06 commit bbb98b8Copy full SHA for bbb98b8
FindAFactor/_find_a_factor.cpp
@@ -999,8 +999,15 @@ struct Factorizer {
999
}
1000
1001
1002
- // All work has been dispatched, but now we must complete it.
1003
- dispatch.finish();
+ if (result == 1U) {
+ // The result has not yet been found.
1004
+ // A succesful item will dump the queue.
1005
+ dispatch.finish();
1006
+ } else {
1007
+ // The result has been found.
1008
+ // If any work remains, dump it.
1009
+ dispatch.dump();
1010
+ }
1011
1012
// Depending on row count, a successful result should be nearly guaranteed.
1013
return result;
0 commit comments