Handling Multiple Concurrent Exceptions in C++ Using Futures

  • Matti Rintala
Part of the Lecture Notes in Computer Science book series (LNCS, volume 4119)


Exception handling is a well-established mechanism in sequential programming. Concurrency and asynchronous calls introduce a possibility for multiple simultaneous exceptions. This complicates exception handling, especially in languages whose support for exceptions has not originally been designed for concurrency. Futures are a mechanism for handling return values in asynchronous calls. They are affected by concurrent exception handling as well, since exceptions and return values are mutually exclusive in functions. This paper discusses these problems and presents a concurrent exception handling mechanism for future-based asynchronous C++ programs.


Reduction Function Exception Handling Abnormal Situation Future Group Future Source 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Goodenough, J.B.: Exception handling: issues and a proposed notation. Communications of the ACM 18(12), 683–696 (1975)CrossRefMathSciNetzbMATHGoogle Scholar
  2. 2.
    Buhr, P.A., Mok, W.Y.R.: Advanced exception handling mechanisms. IEEE Transactions on Software Engineering 26(9), 820–836 (2000)CrossRefGoogle Scholar
  3. 3.
    Halstead, R.H.: Multilisp: A language for concurrent symbolic computation. ACM Transactions on Programming Languages and Systems 7(4), 501–538 (1985)CrossRefzbMATHGoogle Scholar
  4. 4.
    Romanovsky, A.: Extending conventional languages by distributed/concurrent exception resolution. Journal of Systems Architecture 46(1), 79–95 (2000)CrossRefGoogle Scholar
  5. 5.
    Keen, A.W., Olsson, R.A.: Exception handling during asynchronous method invocation. In: Monien, B., Feldmann, R.L. (eds.) Euro-Par 2002. LNCS, vol. 2400, pp. 656–660. Springer, Heidelberg (2002)CrossRefGoogle Scholar
  6. 6.
    Xu, J., Romanovsky, A., Randell, B.: Concurrent exception handling and resolution in distributed object systems. IEEE Transactions on Parallel and Distributed Systems 11(10), 1019–1032 (2000)CrossRefGoogle Scholar
  7. 7.
    Romanovsky, A., Kienzle, J.: Action-oriented exception handling in cooperative and competitive object-oriented systems. In: [31], pp. 147–164Google Scholar
  8. 8.
    Rintala, M.: KC++ — a concurrent C++ programming system. Licentiate thesis, Tampere University of Technology, Tampere, Finland (2000)Google Scholar
  9. 9.
    Winder, R., Roberts, G., McEwan, A., Poole, J., Dzwig, P.: UC++. In: [30], pp. 629–670Google Scholar
  10. 10.
    Stevens, W.R.: Advanced Programming in the UNIX(R) Environment. Addison-Wesley, Reading (1992)Google Scholar
  11. 11.
    Rintala, M.: Exceptions in remote procedure calls using C++ template metaprogramming. Software – Practice and Experience (?) (accepted April 8, 2006) (to appear) DOI: 10.1002/spe.754Google Scholar
  12. 12.
    Ryder, B.G., Soffa, M.L.: Influences on the design of exception handling ACM SIGSOFT project on the impact of software engineering research on programming language design. SIGSOFT Software Engineering Notes 28(4), 29–35 (2003)CrossRefGoogle Scholar
  13. 13.
    ISO/IEC: International Standard 14882 – Programming Languages – C++, 2nd edn. (2003)Google Scholar
  14. 14.
    Stroustrup, B.: The C++ Programming Language (Special Edition). Addison-Wesley, Reading (2000)Google Scholar
  15. 15.
    Caromel, D., Belloncle, F., Roudier, Y.: C++//. In: [30], pp. 257–296Google Scholar
  16. 16.
    Thompson, P.: IOUs: A future implementation. C++ Report, 29–32 (1998)Google Scholar
  17. 17.
    Sun Microsystems, Inc.: JavaTM 2 platform standard edition 5.0 API specification (2004),
  18. 18.
    Andrews, G.R.: Concurrent Programming — Principles and Practice. Addison-Wesley, Reading (1991)Google Scholar
  19. 19.
    Stroustrup, B.: The Design and Evolution of C++. Addison-Wesley, Reading (1994)Google Scholar
  20. 20.
    Issarny, V.: Concurrent exception handling. In: [31], pp. 111–127Google Scholar
  21. 21.
    Chatterjee, A.: Futures: a mechanism for concurrency among objects. In: Proceedings of the 1989 ACM/IEEE conference on Supercomputing, ACM/IEEE, pp. 562–567. ACM Press, New York (1989)CrossRefGoogle Scholar
  22. 22.
    Intermetrics, Inc.: Ada 95 Reference Manual (1995)Google Scholar
  23. 23.
    Arnold, K., Gosling, J.: The Java Programming Language. Addison-Wesley, Reading (1998)Google Scholar
  24. 24.
    Brosgol, B.M.: A comparison of the concurrency features of Ada 95 and Java. In: Proceedings of the 1998 annual ACM SIGAda international conference on Ada, Washington, D.C., United States, pp. 175–192. ACM Press, New York (1998)CrossRefGoogle Scholar
  25. 25.
    Raje, R.R., Williams, J., Boyles, M.: An asynchronous remote method invocation (ARMI) mechanism for Java. Concurrency: Practice and Experience 9(11), 1207–1211 (1997)CrossRefGoogle Scholar
  26. 26.
    Keen, A.W., Ge, T., Maris, J.T., Olsson, R.A.: JR: flexible distributed programming in an extended Java. In: Proceedings of the 21st IEEE International Conference on Distributed Computing Systems, pp. 575–584. IEEE, Los Alamitos (2001)Google Scholar
  27. 27.
    Liskov, B., Shrira, L.: Promises: Linguistic support for efficient asynchronous procedure calls in distributed systems. In: Proceedings of the SIGPLAN 1988 Conference on Programming Language Design and Implementation, pp. 260–267 (1988)Google Scholar
  28. 28.
    Benveniste, M., Issarny, V.: Concurrent programming notations in the object-oriented language Arche. Research Report 1822, INRIA, Rennes, France (1992)Google Scholar
  29. 29.
    Campbell, R.H., Randell, B.: Error recovery in asynchronous systems. IEEE Transactions on Software Engineering 12(8), 811–826 (1986)Google Scholar
  30. 30.
    Wilson, G., Lu, P. (eds.): Parallel Programming Using C++. MIT Press, Cambridge (1996)Google Scholar
  31. 31.
    Romanovsky, A., Dony, C., Knudsen, J.L., Tripathi, A.R. (eds.): ECOOP-WS 2000. LNCS, vol. 2022. Springer, Heidelberg (2001)zbMATHGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2006

Authors and Affiliations

  • Matti Rintala
    • 1
  1. 1.Tampere University of Technology 

Personalised recommendations