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 the mythic schema of all relations between men and women, man proposes, and woman is disposed of.
    Angela Carter (1940–1992)

    In the relations of a weak Government and a rebellious people there comes a time when every act of the authorities exasperates the masses, and every refusal to act excites their contempt.
    John Reed (1887–1920)

    Being the dependents of the general government, and looking to its treasury as the source of all their emoluments, the state officers, under whatever names they might pass and by whatever forms their duties might be prescribed, would in effect be the mere stipendiaries and instruments of the central power.
    Andrew Jackson (1767–1845)

    Today democracy, liberty, and equality are words to fool the people. No nation can progress with such ideas. They stand in the way of action. Therefore we frankly abolish them. In the future each man will serve the interest of the state with absolute obedience. Let him who refuses beware.
    Charlie Chaplin (1889–1977)