Miranda whenBroken

From Erights

Jump to: navigation, search

__whenBroken/1 is a Miranda message for determining when a reference has become a broken reference.


Signature: __whenBroken(reactor :OneArgFunc) :void

Notify the reactor when the reference has transitioned to the broken state.

  • The Miranda method ignores the argument and returns null, as a near reference cannot become broken.
  • If the recipient is an eventual ref, then the message should not be forwarded, but the reactor should be stored for use as follows. (This forms part of the expected behavior of any proxy handler.)
    • If it becomes broken, reactor <- run(problem) should be performed for every __whenBroken message previously received.
    • If it becomes resolved to another ref, then it should forward every __whenBroken message it received to the target.

Original Javadoc

XXX merge

Used to implement "Ref whenBroken/2"; it should not be called directly.

The Miranda behavior ignores the message, as only breakable ref implementations ever respond to this message.

See also: Ref#whenBroken/2


XXX Write tests

Personal tools
more tools