at:tutorial:appendix
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:appendix [2008/07/10 16:02] – added tvcutsem | at:tutorial:appendix [2008/07/10 16:12] – * tvcutsem | ||
---|---|---|---|
Line 424: | Line 424: | ||
=== Multifutures === | === Multifutures === | ||
- | The module ''/ | + | The module ''/ |
+ | |||
+ | A multifuture is constructed as follows: | ||
+ | < | ||
+ | def [mf, resolver] := makeMultiFuture(n, | ||
+ | </ | ||
+ | |||
+ | The parameter '' | ||
+ | |||
+ | A multifuture accepts the following listeners: | ||
< | < | ||
Line 430: | Line 439: | ||
</ | </ | ||
- | This listener is invoked whenever the future is resolved with a new value. Its code can thus be executed multiple times. | + | The above listener is invoked whenever the future is resolved with a new value. Its code can thus be executed multiple times. |
< | < | ||
Line 438: | Line 447: | ||
</ | </ | ||
- | This listener invoked if all results have been gathered (only possible if the maximum number of results is known). If there are no exceptions, only the first code block is triggered. If there are only exceptions, the first block is still invoked with an empty value table. | + | The above listener |
Note the following properties of multifutures: | Note the following properties of multifutures: |
at/tutorial/appendix.txt · Last modified: 2021/09/24 10:28 by elisag