lifetime comments
diff --git a/src/support/delta_debugging.h b/src/support/delta_debugging.h index 0753f7e..5e754be 100644 --- a/src/support/delta_debugging.h +++ b/src/support/delta_debugging.h
@@ -45,6 +45,8 @@ size_t partitionIndex() const { return task.get()->currPartition; } void resolve(bool success) { + // If the algorithm is finished, do not resume the coroutine and let it + // return; we depend on its local state remaining live. if (finished()) { return; } @@ -81,6 +83,8 @@ if (co_yield &state) { working = {}; finished = true; + // Yield the final results rather than returning because we need the local + // state to remain live for the lifetime of the DeltaDebugger. co_yield &state; co_return; }