at:tutorial:actors
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:actors [2008/11/04 10:16] – added tvcutsem | at:tutorial:actors [2009/09/30 13:31] – added tvcutsem | ||
---|---|---|---|
Line 182: | Line 182: | ||
==== The Concept ==== | ==== The Concept ==== | ||
- | The most well-known language feature in concurrent and distributed languages (for example, in ABCL, the actor-based concurrent language) to reconcile return values with asynchronous message sends is the notion of a [[Wp> | + | The most well-known language feature in concurrent and distributed languages (for example, in ABCL, the actor-based concurrent language) to reconcile return values with asynchronous message sends is the notion of a [[Wp> |
+ | |||
+ | Futures are objects that represent return values that may not yet have been computed. Once the asynchronously invoked method has completed, the future is replaced with the actual return value, and objects that referred to the future transparently refer to the return value. | ||
Using futures, it is possible to re-implement the previous example of requesting our calculator actor to add two numbers as follows: | Using futures, it is possible to re-implement the previous example of requesting our calculator actor to add two numbers as follows: | ||
Line 317: | Line 319: | ||
o< | o< | ||
</ | </ | ||
+ | |||
+ | When a message send is annotated with the '' | ||
+ | |||
+ | < | ||
+ | o< | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | More details about the '' | ||
+ | </ | ||
Finally, it is possible to first invoke '' | Finally, it is possible to first invoke '' |
at/tutorial/actors.txt · Last modified: 2020/02/05 21:26 by elisag