[squeak-dev] Re: The broken user interrupt,
or the saga of 100000 factorial.
Andreas Raab
andreas.raab at gmx.de
Fri Dec 23 14:09:22 UTC 2011
On 12/22/2011 22:24, David T. Lewis wrote:
> I think I found the underlying cause of all this grief, which in fact
> has nothing to do with the user interrupt handler. The problem is that
> the weak finalization process is very busy due to thrashing between
> the VM and the image. The VM notifies the image when weak references
> need to be cleaned up, and the weak finalization process responds by
> creating new weak references for the VM to clean up, etc etc etc ...
Excellent find!
Cheers,
- Andreas
> A fix is posted to the inbox in Collections-dtl.466
>
> As Andreas observes, creating a smarter user interrupt handler is not
> at all trivial. But creating a smarter weak finalization process is
> really easy :) The solution was to move the check for VM support of new
> finalization out of the finalization process, and perform the check
> once at image startUp time.
>
> With that change in place, the following may all be interrupted in
> the expected way:
>
> "[true] whileTrue"
> "[[true] whileTrue] forkAt: Processor userSchedulingPriority + 1"
> "Smalltalk createStackOverflow"
> "[Smalltalk createStackOverflow] forkAt: Processor userSchedulingPriority + 1"
>
> Just for the record, this problem was a whole lot harder to figure out
> than it was to explain ;-)
>
> Dave
>
>
>
More information about the Squeak-dev
mailing list
|