[Aptitude-svn-commit] r4097 - in branches/aptitude-0.3/aptitude: .
src/generic/problemresolver
Daniel Burrows
dburrows at costa.debian.org
Thu Sep 15 21:37:59 UTC 2005
Author: dburrows
Date: Thu Sep 15 21:37:56 2005
New Revision: 4097
Modified:
branches/aptitude-0.3/aptitude/ChangeLog
branches/aptitude-0.3/aptitude/src/generic/problemresolver/problemresolver.h
Log:
Allow the cancellation of a find_next_solution call to be revoked.
Modified: branches/aptitude-0.3/aptitude/ChangeLog
==============================================================================
--- branches/aptitude-0.3/aptitude/ChangeLog (original)
+++ branches/aptitude-0.3/aptitude/ChangeLog Thu Sep 15 21:37:56 2005
@@ -1,5 +1,10 @@
2005-09-15 Daniel Burrows <dburrows at debian.org>
+ * src/generic/problemresolver/problemresolver.h:
+
+ Allow the cancellation of a find_next_solution call to be
+ revoked.
+
* src/generic/threads.h:
Let the filled state of void boxes be directly set in the
Modified: branches/aptitude-0.3/aptitude/src/generic/problemresolver/problemresolver.h
==============================================================================
--- branches/aptitude-0.3/aptitude/src/generic/problemresolver/problemresolver.h (original)
+++ branches/aptitude-0.3/aptitude/src/generic/problemresolver/problemresolver.h Thu Sep 15 21:37:56 2005
@@ -2123,13 +2123,20 @@
}
/** Cancel any find_next_solution call that is executing in the
- * background. If no such call is executing, do nothing.
+ * background. If no such call is executing, then the next call
+ * will immediately be cancelled.
*/
void cancel_solver()
{
threads::mutex::lock l(execution_mutex);
- if(solver_executing)
- solver_cancelled = true;
+ solver_cancelled = true;
+ }
+
+ /** Remove any pending find_next_solution cancellation. */
+ void uncancel_solver()
+ {
+ threads::mutex::lock l(execution_mutex);
+ solver_cancelled = false;
}
/** Try to find the "next" solution: remove partial solutions from
More information about the Aptitude-svn-commit
mailing list