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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
Goodenough, J.B.: Exception handling: issues and a proposed notation. Communications of the ACM 18(12), 683–696 (1975)
Buhr, P.A., Mok, W.Y.R.: Advanced exception handling mechanisms. IEEE Transactions on Software Engineering 26(9), 820–836 (2000)
Halstead, R.H.: Multilisp: A language for concurrent symbolic computation. ACM Transactions on Programming Languages and Systems 7(4), 501–538 (1985)
Romanovsky, A.: Extending conventional languages by distributed/concurrent exception resolution. Journal of Systems Architecture 46(1), 79–95 (2000)
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)
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)
Romanovsky, A., Kienzle, J.: Action-oriented exception handling in cooperative and competitive object-oriented systems. In: [31], pp. 147–164
Rintala, M.: KC++ — a concurrent C++ programming system. Licentiate thesis, Tampere University of Technology, Tampere, Finland (2000)
Winder, R., Roberts, G., McEwan, A., Poole, J., Dzwig, P.: UC++. In: [30], pp. 629–670
Stevens, W.R.: Advanced Programming in the UNIX(R) Environment. Addison-Wesley, Reading (1992)
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
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)
ISO/IEC: International Standard 14882 – Programming Languages – C++, 2nd edn. (2003)
Stroustrup, B.: The C++ Programming Language (Special Edition). Addison-Wesley, Reading (2000)
Caromel, D., Belloncle, F., Roudier, Y.: C++//. In: [30], pp. 257–296
Thompson, P.: IOUs: A future implementation. C++ Report, 29–32 (1998)
Sun Microsystems, Inc.: JavaTM 2 platform standard edition 5.0 API specification (2004), http://java.sun.com/j2se/1.5.0/docs/api/
Andrews, G.R.: Concurrent Programming — Principles and Practice. Addison-Wesley, Reading (1991)
Stroustrup, B.: The Design and Evolution of C++. Addison-Wesley, Reading (1994)
Issarny, V.: Concurrent exception handling. In: [31], pp. 111–127
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)
Intermetrics, Inc.: Ada 95 Reference Manual (1995)
Arnold, K., Gosling, J.: The Java Programming Language. Addison-Wesley, Reading (1998)
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)
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)
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)
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)
Benveniste, M., Issarny, V.: Concurrent programming notations in the object-oriented language Arche. Research Report 1822, INRIA, Rennes, France (1992)
Campbell, R.H., Randell, B.: Error recovery in asynchronous systems. IEEE Transactions on Software Engineering 12(8), 811–826 (1986)
Wilson, G., Lu, P. (eds.): Parallel Programming Using C++. MIT Press, Cambridge (1996)
Romanovsky, A., Dony, C., Knudsen, J.L., Tripathi, A.R. (eds.): ECOOP-WS 2000. LNCS, vol. 2022. Springer, Heidelberg (2001)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights 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)