Abstracting process-to-function relations in concurrent object-oriented applications

合集下载
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

Published in proceedings of the European Conference on Object-Oriented Programming (ECOOP), Bologna, Italy. Springer-Verlag LNCS 821. June 1994.
© Copyright 1994 Springer-Verlag
This work is subject to copyright. All rights are reserved, whether the whole or part of the material is concerned, specifically the rights of translation, reprinting, re-use of illustrations, recitation, broadcasting, reproduction on microfilms or in any other way, and storage in data banks. Duplication of this publication in its current version, and permission for use must always be obtained from Springer-Verlag. Violations are liable for prosecution under the German Copyright Law.
12A Object−Oriented program
Object−Oriented program Object−Oriented program 1A 2A 2B
Synchronization Scheme Synchronization Scheme B
Queue Number
class Queue {
ElementList *el;DemNumber *max;
public:
void Put (Element *);
Element *Remove ( );};void Queue::Put (Element *e) {el −>Put (e);else {
}while (1) {{return;
}
}
this_activity −>Suspend ( );
char lockname[50];if (this −>get_n_elements() < max)
lock naming for when preconditions evaluate to false REQUIRES default code (only this line!)
(preconditions = true)(preconditions = false)FALSE EXCLUSIVE x1ActivityList *_al;
LockManager −>Lock (this_activity, lockname);if (_al −>n_elements( ) != 0)
_al −>pop( )−>Resume( );
unblock some activity over this object _al −>insert (this_activity);
WAIT ON_ENTRY ON_EXIT
LockManager −>Unlock (this_activity, lockname);LockManager −>Unlock (this_activity, lockname);(forever)(PER_OBJECT x1, within sync_A)sprintf (lockname, "sync_A_x1%x", this);cout << "Entering Put";。

相关文档
最新文档