Carlos Rafael Gimenes das Neves, E. Guerra, C. Fernandes
{"title":"Language support for asynchronous event handling in the invocation call stack","authors":"Carlos Rafael Gimenes das Neves, E. Guerra, C. Fernandes","doi":"10.1145/2089131.2089141","DOIUrl":null,"url":null,"abstract":"There are times during the normal execution flow of programs, when an object of a class wishes to be notified about some special event which may take place in a method it calls. Some other times, this event might not happen in the directly called method, but in another one, deeper in the call stack, beyond the knowledge of the caller class. To overcome this, a common solution is to create structures close to the Observer design pattern, which ends up coupling the caller class with the called class and lacks asyn-chronous behavior. In order not to couple the classes, exception handling can be used, as long as the premature termination of the called method is not a concern. The present essay proposes a solution to fill this gap and describes the initial concept of a technique to asynchronously handle events triggered inside any method within the current call stack, without coupling classes.","PeriodicalId":168332,"journal":{"name":"SIGPLAN symposium on New ideas, new paradigms, and reflections on programming and software","volume":"27 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2011-10-22","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"1","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"SIGPLAN symposium on New ideas, new paradigms, and reflections on programming and software","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/2089131.2089141","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 1
Abstract
There are times during the normal execution flow of programs, when an object of a class wishes to be notified about some special event which may take place in a method it calls. Some other times, this event might not happen in the directly called method, but in another one, deeper in the call stack, beyond the knowledge of the caller class. To overcome this, a common solution is to create structures close to the Observer design pattern, which ends up coupling the caller class with the called class and lacks asyn-chronous behavior. In order not to couple the classes, exception handling can be used, as long as the premature termination of the called method is not a concern. The present essay proposes a solution to fill this gap and describes the initial concept of a technique to asynchronously handle events triggered inside any method within the current call stack, without coupling classes.