Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Add link to Promises/A+


Guava provides a similar capability with sameThreadExecutor. It is somewhat related to the JDK's CallerRunsPolicy for rejected execution.

Further Analysis


The APIs in this proposal can be delivered either as a library or as an extension to the Clojure language.

Extending the Clojure language has the benefits of enhancing the existing promise and future in a standard way. Having a standard mechanism for callbacks at the language level will facilitate sharing callbacks across different libraries and frameworks.


A callback function (really, any function) can do one of three things:


Promises do not provide an API to report partial progress during a long-running operation. Progress reporting can be handled through other means such as watches.


Promises can be implemented in ClojureScript, subject to the following limitations:


References / Related Work