[Aptitude-svn-commit] r4173 - in branches/aptitude-0.3/aptitude: . src/generic

Daniel Burrows dburrows at costa.debian.org
Thu Sep 22 17:27:03 UTC 2005


Author: dburrows
Date: Thu Sep 22 17:27:00 2005
New Revision: 4173

Modified:
   branches/aptitude-0.3/aptitude/ChangeLog
   branches/aptitude-0.3/aptitude/src/generic/resolver_manager.cc
Log:
Make get_solution_background_blocking reduce directly to get_solution_background when block_steps == 0.

Modified: branches/aptitude-0.3/aptitude/ChangeLog
==============================================================================
--- branches/aptitude-0.3/aptitude/ChangeLog	(original)
+++ branches/aptitude-0.3/aptitude/ChangeLog	Thu Sep 22 17:27:00 2005
@@ -1,5 +1,10 @@
 2005-09-22  Daniel Burrows  <dburrows at debian.org>
 
+	* src/generic/resolver_manager.cc:
+
+	  Optimize for the case of block_steps == 0 (so users can
+	  stop it from using any threading primitives at all).
+
 	* src/vscreen/vs_menubar.cc, src/vscreen/vs_menubar.h:
 
 	  If the screen is too narrow to display a whole menubar, allow it

Modified: branches/aptitude-0.3/aptitude/src/generic/resolver_manager.cc
==============================================================================
--- branches/aptitude-0.3/aptitude/src/generic/resolver_manager.cc	(original)
+++ branches/aptitude-0.3/aptitude/src/generic/resolver_manager.cc	Thu Sep 22 17:27:00 2005
@@ -677,6 +677,12 @@
 							int block_steps,
 							background_continuation *k)
 {
+  if(block_steps == 0)
+    {
+      get_solution_background(solution_num, max_steps, k);
+      return false;
+    }
+
   int remaining;
 
   if(block_steps < max_steps)



More information about the Aptitude-svn-commit mailing list