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 between, relations, forms and/or future:

    Consciousness, we shall find, is reducible to relations between objects, and objects we shall find to be reducible to relations between different states of consciousness; and neither point of view is more nearly ultimate than the other.
    —T.S. (Thomas Stearns)

    I only desire sincere relations with the worthiest of my acquaintance, that they may give me an opportunity once in a year to speak the truth.
    Henry David Thoreau (1817–1862)

    The method of authority will always govern the mass of mankind; and those who wield the various forms of organized force in the state will never be convinced that dangerous reasoning ought not to be suppressed in some way.
    Charles Sanders Peirce (1839–1914)

    It is marvelous indeed to watch on television the rings of Saturn close; and to speculate on what we may yet find at galaxy’s edge. But in the process, we have lost the human element; not to mention the high hope of those quaint days when flight would create “one world.” Instead of one world, we have “star wars,” and a future in which dumb dented human toys will drift mindlessly about the cosmos long after our small planet’s dead.
    Gore Vidal (b. 1925)