Matthew D Fleming 08b163fa51 Put the general logic for being a CPU hog into a new function
should_yield().  Use this in various places.  Encapsulate the common
case of check-and-yield into a new function maybe_yield().

Change several checks for a magic number of iterations to use
should_yield() instead.

MFC after:	1 week
2011-02-02 16:35:10 +00:00
..
2010-11-12 20:55:14 +00:00
2011-01-30 20:38:26 +00:00
2007-05-13 18:21:54 +00:00