[Pharo-project] 12186 image quit problem

Igor Stasenko siguctua at gmail.com
Sun Oct 10 07:56:19 EDT 2010

OKay, now i see what the problem:

<weak registry protected>
   <finalize items>
            <HostSystemMenusProxy class>>unregister>
              <weak registry protected>

In my WeakRegistry, a #finalize message sent while registry semaphore locked,
so, in case if object in #finalize trying to manipulate with registry
then it going to deadlock.

Then following piece:


self protected: [
	valueDictionary expiredValuesDo: [:finItem |
		finItem finalizeValues 	].

should be rewritten as:

| expired |
expired := OrderedCollection new.
self protected: [
	valueDictionary expiredValuesDo: [:finItem | expired add: finItem ]
expired do: #finalizeValues.

But either way, HostSystemMenusProxy should not attempt remove itself
from registry during #finalize (and causing a deadlock),
since its pointless.

Best regards,
Igor Stasenko AKA sig.

More information about the Pharo-dev mailing list