Skip to main content

Handling Multiple Concurrent Exceptions in C++ Using Futures

  • Chapter
Advanced Topics in Exception Handling Techniques

Part of the book series: Lecture Notes in Computer Science ((LNPSE,volume 4119))

Abstract

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Goodenough, J.B.: Exception handling: issues and a proposed notation. Communications of the ACM 18(12), 683–696 (1975)

    Article  MathSciNet  MATH  Google Scholar 

  2. Buhr, P.A., Mok, W.Y.R.: Advanced exception handling mechanisms. IEEE Transactions on Software Engineering 26(9), 820–836 (2000)

    Article  Google Scholar 

  3. Halstead, R.H.: Multilisp: A language for concurrent symbolic computation. ACM Transactions on Programming Languages and Systems 7(4), 501–538 (1985)

    Article  MATH  Google Scholar 

  4. Romanovsky, A.: Extending conventional languages by distributed/concurrent exception resolution. Journal of Systems Architecture 46(1), 79–95 (2000)

    Article  Google Scholar 

  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)

    Chapter  Google Scholar 

  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)

    Article  Google Scholar 

  7. Romanovsky, A., Kienzle, J.: Action-oriented exception handling in cooperative and competitive object-oriented systems. In: [31], pp. 147–164

    Google Scholar 

  8. Rintala, M.: KC++ — a concurrent C++ programming system. Licentiate thesis, Tampere University of Technology, Tampere, Finland (2000)

    Google Scholar 

  9. Winder, R., Roberts, G., McEwan, A., Poole, J., Dzwig, P.: UC++. In: [30], pp. 629–670

    Google Scholar 

  10. Stevens, W.R.: Advanced Programming in the UNIX(R) Environment. Addison-Wesley, Reading (1992)

    Google Scholar 

  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.754

    Google Scholar 

  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)

    Article  Google Scholar 

  13. ISO/IEC: International Standard 14882 – Programming Languages – C++, 2nd edn. (2003)

    Google Scholar 

  14. Stroustrup, B.: The C++ Programming Language (Special Edition). Addison-Wesley, Reading (2000)

    Google Scholar 

  15. Caromel, D., Belloncle, F., Roudier, Y.: C++//. In: [30], pp. 257–296

    Google Scholar 

  16. Thompson, P.: IOUs: A future implementation. C++ Report, 29–32 (1998)

    Google Scholar 

  17. Sun Microsystems, Inc.: JavaTM 2 platform standard edition 5.0 API specification (2004), http://java.sun.com/j2se/1.5.0/docs/api/

  18. Andrews, G.R.: Concurrent Programming — Principles and Practice. Addison-Wesley, Reading (1991)

    Google Scholar 

  19. Stroustrup, B.: The Design and Evolution of C++. Addison-Wesley, Reading (1994)

    Google Scholar 

  20. Issarny, V.: Concurrent exception handling. In: [31], pp. 111–127

    Google Scholar 

  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)

    Chapter  Google Scholar 

  22. Intermetrics, Inc.: Ada 95 Reference Manual (1995)

    Google Scholar 

  23. Arnold, K., Gosling, J.: The Java Programming Language. Addison-Wesley, Reading (1998)

    Google Scholar 

  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)

    Chapter  Google Scholar 

  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)

    Article  Google Scholar 

  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. 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. Benveniste, M., Issarny, V.: Concurrent programming notations in the object-oriented language Arche. Research Report 1822, INRIA, Rennes, France (1992)

    Google Scholar 

  29. Campbell, R.H., Randell, B.: Error recovery in asynchronous systems. IEEE Transactions on Software Engineering 12(8), 811–826 (1986)

    Google Scholar 

  30. Wilson, G., Lu, P. (eds.): Parallel Programming Using C++. MIT Press, Cambridge (1996)

    Google Scholar 

  31. Romanovsky, A., Dony, C., Knudsen, J.L., Tripathi, A.R. (eds.): ECOOP-WS 2000. LNCS, vol. 2022. Springer, Heidelberg (2001)

    MATH  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2006 Springer-Verlag Berlin Heidelberg

About this chapter

Cite this chapter

Rintala, M. (2006). Handling Multiple Concurrent Exceptions in C++ Using Futures. In: Dony, C., Knudsen, J.L., Romanovsky, A., Tripathi, A. (eds) Advanced Topics in Exception Handling Techniques. Lecture Notes in Computer Science, vol 4119. Springer, Berlin, Heidelberg. https://doi.org/10.1007/11818502_4

Download citation

  • DOI: https://doi.org/10.1007/11818502_4

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-37443-5

  • Online ISBN: 978-3-540-37445-9

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics