Status: Accepted
Owner:
[hidden email]
CC:
[hidden email],
[hidden email]
Labels: Milestone-1.3
New issue 3821 by
[hidden email]: makeStrong/makeWeak contains a bug
http://code.google.com/p/pharo/issues/detail?id=3821makeStrong/makeWeak contains a bug, because it is using #becomeForward:
but doesn't takes into account that subscription stored in a set ,
which is hash-based , so after become, the item will be at wrong
position.
So, we need to implement
announcer>>replace: subscription with: newOne
then
a) we don't have to use become
b) it will be thread safe, because you can protect replacement in
subscription registry with monitor
As an alternative, we can use Set instead of IdentitySet, and
implement #hash and #== for subscriptions
which don't changing when you switch between weak/strong. Then we can
keep using #becomeForward:
--
Best regards,
Igor Stasenko AKA sig.