Futures and Promises - Relations Between The Expressiveness of Different Forms of Future

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:

    Society does not consist of individuals but expresses the sum of interrelations, the relations within which these individuals stand.
    Karl Marx (1818–1883)

    All ... forms of consensus about “great” books and “perennial” problems, once stabilized, tend to deteriorate eventually into something philistine. The real life of the mind is always at the frontiers of “what is already known.” Those great books don’t only need custodians and transmitters. To stay alive, they also need adversaries. The most interesting ideas are heresies.
    Susan Sontag (b. 1933)

    Only he who can view his own past as an abortion sprung from compulsion and need can use it to full advantage in the present. For what one has lived is at best comparable to a beautiful statue which has had all its limbs knocked off in transit, and now yields nothing but the precious block out of which the image of one’s future must be hewn.
    Walter Benjamin (1892–1940)