A Polymorphic Future and First-class Function Type for Concurrent Object-Oriented Programming

A \future" is a typed synchronization mechanism used to represent a value that will come into existence at some point in time after the creation of the future. In this paper, a polymorphic future type is introduced that di ers from previous mechanisms in that it provides a rst-class, extensible facility for expressing synchronized access to the typed result value of a concurrent computation. The proposed mechanism requires write-once/read-many synchronization, which is implemented in terms of common thread synchronization primitives, thereby ensuring a high-degree of e ciency. The type de nition and type specialization features of C++ are used to illustrate how one would implement a polymorphic future type in a strongly typed object-oriented language supporting polymorphic type de nitions.

[1]  Robert H. Halstead,et al.  MULTILISP: a language for concurrent symbolic computation , 1985, TOPL.

[2]  Bjarne Stroustrup,et al.  The C++ Programming Language, First Edition , 1986 .

[3]  Mitchell Wand,et al.  Obtaining Coroutines with Continuations , 1986, Comput. Lang..

[4]  Barbara Liskov,et al.  Program Development in Java - Abstraction, Specification, and Object-Oriented Design , 1986 .

[5]  Barbara Liskov,et al.  Implementation of Argus , 1987, SOSP '87.

[6]  Barbara Liskov,et al.  Distributed programming in Argus , 1988, CACM.

[7]  Liuba Shrira,et al.  Promises: linguistic support for efficient asynchronous procedure calls in distributed systems , 1988, PLDI '88.

[8]  Brian N. Bershad,et al.  PRESTO: A system for object‐oriented parallel programming , 1988, Softw. Pract. Exp..

[9]  Yasuhiko Yokote Implementation of Concurrent Smalltalk , 1990 .

[10]  Bjarne Stroustrup,et al.  The Annotated C++ Reference Manual , 1990 .

[11]  Amer Diwan,et al.  A Language-Independent Garbage Collector Toolkit , 1991 .

[12]  Jack W. Davidson,et al.  Subprogram Inlining: A Study of its Effects on Program Execution Time , 1992, IEEE Trans. Software Eng..

[13]  Brian N. Bershad,et al.  Fast mutual exclusion for uniprocessors , 1992, ASPLOS V.

[14]  Frank Mueller,et al.  A Library Implementation of POSIX Threads under UNIX , 1993, USENIX Winter.

[15]  Andrew S. Grimshaw,et al.  Easy-to-use object-oriented parallel processing with Mentat , 1993, Computer.