User Tools

Site Tools


at:tutorial:appendix

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revisionBoth sides next revision
at:tutorial:appendix [2008/07/10 16:02] – added tvcutsemat:tutorial:appendix [2008/07/10 16:08] – * tvcutsem
Line 424: Line 424:
 === Multifutures === === Multifutures ===
  
-The module ''/.at.lang.multifutures'' provides support for multifutures. A multifuture is a future that can be resolved multiple times. We distinguish between 'bounded multifutures', which can be resolved up to a maximum number and 'unbounded multifutures' which have no upper bound. A multifuture accepts  the following listeners:+The module ''/.at.lang.multifutures'' provides support for multifutures. A multifuture is a future that can be resolved multiple times. We distinguish between 'bounded multifutures', which can be resolved up to a maximum number and 'unbounded multifutures' which have no upper bound. 
 + 
 +A multifuture is constructed as follows: 
 +<code> 
 +def [mf, resolver] := makeMultiFuture(n, timeout); 
 +</code> 
 + 
 +The parameter ''n'' indicates the maximum number of values/exceptions with which the future can be resolved/ruined. If ''n'' is ''nil'', the multifuture is unbounded. The timeout parameter is optional. If not nil, it is a timeout period in milliseconds that causes the multifuture to //automatically// become fully resolved after the provided timeout. Once fully resolved, a multifuture will not accept any new values/exceptions, even if it has not reached its "upper bound" ''n'' yet. 
 + 
 +A multifuture accepts the following listeners:
  
 <code> <code>
at/tutorial/appendix.txt · Last modified: 2021/09/24 10:28 by elisag