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/29 10:27] – elisag | at:tutorial:distribution [2009/01/29 10:33] – elisag | ||
---|---|---|---|
Line 134: | Line 134: | ||
</ | </ | ||
- | The '' | + | The '' |
< | < | ||
Line 202: | Line 202: | ||
Single-call leases are useful for objects adhering to a single call pattern, such as callback objects. Callback objects are often used in asynchronous message passing schemes in order for remote object to be able to return values. These callback objects are typically remotely accessed only once by remote objects with the computed return value. In AmbientTalk, | Single-call leases are useful for objects adhering to a single call pattern, such as callback objects. Callback objects are often used in asynchronous message passing schemes in order for remote object to be able to return values. These callback objects are typically remotely accessed only once by remote objects with the computed return value. In AmbientTalk, | ||
- | We have integrated leasing into futures by parameter-passing a future attached to an asynchronous message via a singe-call lease which either expires due to a timeout or upon the reception of the computed return value. The timeout for the implicit single-call lease on a future can be set by annotating the asynchronous message with a @Due annotation as follows: | + | We have integrated leasing into futures by parameter-passing a future attached to an asynchronous message via a singe-call lease which either expires due to a timeout or upon the reception of the computed return value. The timeout for the implicit single-call lease on a future can be set by annotating the asynchronous message with a '' |
< | < | ||
Line 213: | Line 213: | ||
</ | </ | ||
- | If the future is resolved, the session variable stores a leased object reference to the remote session object. | + | If the future is resolved, the session variable stores a leased object reference to the remote session object. |
< | < | ||
- | Note that specifying a catch: block for the TimeoutException is equivalent to installing a when: | + | Note that specifying a '' |
</ | </ | ||
====Importing leased object references==== | ====Importing leased object references==== | ||
- | Similar to futures, leased object references have been built reflectively on top of AmbientTalk. | + | Similar to futures, leased object references have been built reflectively on top of AmbientTalk. |
To use the language constructs for leased references, you should import the leasedref module as follows: | To use the language constructs for leased references, you should import the leasedref module as follows: | ||
- | import /.at.lang.leasedref; | + | < |
+ | import /.at.lang.leasedrefs; | ||
+ | </ | ||
< | < | ||
- | leasedref | + | leasedrefs |
</ | </ | ||
at/tutorial/distribution.txt · Last modified: 2009/01/30 16:13 by tvcutsem