MPS issue job001156

TitleMPS cannot queue a message when a weak thing goes away
Assigned userGareth Rees
DescriptionMPS cannot queue a message when a weak thing goes away. There should be option to queue a message. See customer request [1].
AnalysisSee [2] for analysis from RB.

GDR 2013-03-08: It looks to me as though this is not a problem any more. In the current implementation of weakness, you can detect the splatting of a weak reference by looking in the scan method to see if the reference became NULL when you fixed it. See the example in the documentation [3]. This is likely to be timelier than waiting for a message on the message queue.

If you absolutely insist on using messages, you can pair your weak reference with a strong reference to a finalizable object, and then when you detect that the weak reference has been splatted, then you null out the corresponding strong reference, which will (eventually) cause a finalization message to be sent.
How foundcustomer
Evidence[1] <>
[2] <>
[3] <>
Observed in1.105.0
Created byRichard Kistruck
Created on2005-03-10 03:11:45
Last modified byRichard Brooksby
Last modified on2013-03-12 12:50:35
History2005-03-10 RHSK Created.
2005-04-05 RB Added reference to notes from analysis session.
2013-03-08 GDR More analysis.


Change Effect Date User Description
180202 closed 2012-10-31 17:45:35 Gareth Rees Write weak references chapter.