继承异常的一种解决方法 AN APPROACH TO INHERITANCE ANOMALY 张黔 1 first-author 李卫华 1 武汉大学计算机科学与技术学院国家多媒体软件工程技术研究中心教育部多媒体软件开放研究实验室 武汉大学计算机科学与技术学院国家多媒体软件工程技术研究中心教育部多媒体软件开放研究实验室 继承异常用来描述在并发面向对象语言中继承与并发的冲突.对继承异常做了系统的分析,给出一种新的分类.提出在一并发对象中将同步部分与顺序部分分离,生成两个对象,通过将同步代码放入一单独对象,将继承过程分为顺序部分和同步部分,这种分离大大地减少了继承异常的发生. The term “inheritance anomaly” was coined to describe the conflict between inheritance and concurrency in object oriented languages. In this paper, we perform a systematic analysis of the inheritance anomaly and derive a new classification of it. We propose the separation of the synchronization code from the sequential code of a concurrent object,arriving at two objects.By moving the synchronization code into a separate object,we divide the inheritance process into a sequential part and a synchronization part.The splitted inheritance dramatically reduces the number of inheritance anomaly occuring. 继承异常 同步异常 同步约束 嵌套管程调用 inheritance anomaly synchronization anomaly synchronization constraint nested monitor call TP311.1 国家“863”项目 1998-03-01 2021-04-01 3