at:tutorial:distribution
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
at:tutorial:distribution [2009/01/28 17:52] – elisag | at:tutorial:distribution [2009/01/29 10:27] – elisag | ||
---|---|---|---|
Line 161: | Line 161: | ||
< | < | ||
when: mySession expired: { | when: mySession expired: { | ||
- | ... // free up resources used by this session | + | ... // free up resources used by this session |
} | } | ||
</ | </ | ||
Line 168: | Line 168: | ||
====Leasing patterns==== | ====Leasing patterns==== | ||
- | |||
As is the case in other leasing mechanisms, determining the proper lease renewal period is not straightforward and may even depend on system parameters such as the number of clients. In AmbientTalk, | As is the case in other leasing mechanisms, determining the proper lease renewal period is not straightforward and may even depend on system parameters such as the number of clients. In AmbientTalk, | ||
- | The first variant is a renew-on-call leased reference which automatically prolongs the lease upon each method call received | + | The first variant is a //renew-on-call// leased reference which automatically prolongs the lease upon each method call received |
- | by the remote object. In other words, as long as the client uses the remote object, the leased reference is transparently renewed by the interpreter. | + | by the remote object. In other words, as long as the client uses the remote object, the leased reference is transparently renewed by the interpreter. |
< | < | ||
Line 186: | Line 185: | ||
</ | </ | ||
- | Similar to lease:for: , this construct takes as parameters a time interval (in milliseconds) and the remote object to which it grants access, and returns a leased | + | Similar to '' |
- | The second variant is a single-call leased reference which automatically revokes the lease upon performing a successful method call on the remote object. | + | The second variant is a //single-call// leased reference which automatically revokes the lease upon performing a successful method call on the remote object. |
< | < | ||
Line 197: | Line 196: | ||
</ | </ | ||
- | Similar to its other two counterparts | + | Similar to the other two constructs, '' |
- | expires after the remote object receives a single message. However, if no message has been received within the specified time interval, the leased reference also expires. | + | |
====Integrating leasing with future-type message passing==== | ====Integrating leasing with future-type message passing==== |
at/tutorial/distribution.txt · Last modified: 2009/01/30 16:13 by tvcutsem