Help: #drawOn: method monopolizes processor

Tim Rowledge rowledge at interval.com
Tue Jun 15 20:37:49 UTC 1999


This is not at all surprising; your code performs a very complex calculation
which will take quite a while to run. Since it runs at user priority, no
process at the same or lower priority will get any slot to run.

You could:-
a) put a 'Processor yield' somewhere in the outer loop, or
b) startup a higher priority process that simply loops around waiting for 'x'
milliseconds and which ought to stir-up the process lists a bit. This depends
on details of the process suspend/resume implementation.

I'd give a) a try first because it is so much simpler.
Change
	1.0 to: 300.0 do: [:i | 1.0 to: 150.0 do:
to
	1.0 to: 300.0 do: [:i | Processor yield.
								1.0 to: 150.0 do:
and see if it helps.

tim
 
-- 
You have a tendency to feel you are superior to most computers.
Tim Rowledge:  rowledge at interval.com (w)  +1 (650) 842-6110 (w)
 tim at sumeru.stanford.edu (h)  <http://sumeru.stanford.edu/tim>





More information about the Squeak-dev mailing list