Relations Between The Expressiveness of Different Forms of Future
Eager thread-specific futures can be straightforwardly implemented in terms of non-thread-specific futures, by creating a thread to calculate the value at the same time as creating the future. In this case it is desirable to return a read-only view to the client, so that only the newly created thread is able to resolve this future.
To implement implicit lazy thread-specific futures (as provided by Alice ML, for example) in terms in non-thread-specific futures, needs a mechanism to determine when the future's value is first needed (for example, the WaitNeeded construct in Oz). If all values are objects, then the ability to implement transparent forwarding objects is sufficient, since the first message sent to the forwarder indicates that the future's value is needed.
Non-thread-specific futures can be implemented in terms of thread-specific futures, assuming that the system supports message passing, by having the resolving thread send a message to the future's own thread. However, this could be argued to be unnecessary complexity: in programming languages based on threads, the most expressive approach appears to be to provide a combination of non-thread-specific futures, read-only views, and either a 'WaitNeeded' construct or support for transparent forwarding.
Read more about this topic: Futures And Promises
Famous quotes containing the words relations, forms and/or future:
“Major [William] McKinley visited me. He is on a stumping tour.... I criticized the bloody-shirt course of the canvass. It seems to me to be bad politics, and of no use.... It is a stale issue. An increasing number of people are interested in good relations with the South.... Two ways are open to succeed in the South: 1. A division of the white voters. 2. Education of the ignorant. Bloody-shirt utterances prevent division.”
—Rutherford Birchard Hayes (18221893)
“Play gives children a chance to practice what they are learning....They have to play with what they know to be true in order to find out more, and then they can use what they learn in new forms of play.”
—Fred Rogers (20th century)
“We live in an age when to be young and to be indifferent can be no longer synonymous. We must prepare for the coming hour. The claims of the Future are represented by suffering millions; and the Youth of a Nation are the trustees of Posterity.”
—Benjamin Disraeli (18041881)