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:

    In today’s world parents find themselves at the mercy of a society which imposes pressures and priorities that allow neither time nor place for meaningful activities and relations between children and adults, which downgrade the role of parents and the functions of parenthood, and which prevent the parent from doing things he wants to do as a guide, friend, and companion to his children.
    Urie Bronfenbrenner (b. 1917)

    When one walks, one is brought into touch first of all with the essential relations between one’s physical powers and the character of the country; one is compelled to see it as its natives do. Then every man one meets is an individual. One is no longer regarded by the whole population as an unapproachable and uninteresting animal to be cheated and robbed.
    Aleister Crowley (1875–1947)

    I regret the unhappiness of princes who are slaves to forms and fettered by caution.
    Elizabeth I (1533–1603)

    We must choose. Be a child of the past with all its crudities and imperfections, its failures and defeats, or a child of the future, the future of symmetry and ultimate success.
    Frances E. Willard 1839–1898, U.S. president of the Women’s Christian Temperance Union 1879-1891, author, activist. The Woman’s Magazine, pp. 137-40 (January 1887)