[squeak-dev] Re: Process bug introduced in 3.10

bryce at kampjes.demon.co.uk bryce at kampjes.demon.co.uk
Tue Apr 29 20:05:02 UTC 2008


Andreas Raab writes:
 > Of course, if I'd ever learn how to spell "timeout" correctly, I might 
 > find out that that's not the problem. Back to the drawing board... (but 
 > I'm still not convinced that the problem isn't somewhere in the nested 
 > unwind-protect stuff).

The first version crashes reliably during the first few iterations but
the second runs to completion.  This indicates to me that it's a race
inside terminate, but this isn't sufficient proof. All that's changed
between the two expressions is the timeout of the TestProfiler delay.
In the first expression it's 500 milliseconds, which will line up with
the outer termination loop while in the second it's 600 milliseconds
which doesn't syncronise so often.


    100 timesRepeat:
	[processes := (1 to: 10) collect: [:each| [[(TestProfiler new spyOn: [(Delay forMilliseconds: 500) wait]) ] repeat] fork ].
	(Delay forSeconds: 1) wait.
	Exupery log: 'terminate'..
	processes do: [:each| each terminate.].
	Exupery log: 'done'.]


    100 timesRepeat:
	[processes := (1 to: 10) collect: [:each| [[(TestProfiler new spyOn: [(Delay forMilliseconds: 600) wait]) ] repeat] fork ].
	(Delay forSeconds: 1) wait.
	Exupery log: 'terminate'..
	processes do: [:each| each terminate.].
	Exupery log: 'done'.]

Bryce



More information about the Squeak-dev mailing list