Welcome to Telelogic Product Support
  Home Downloads Knowledgebase Case Tracking Licensing Help Telelogic Passport
Telelogic Rhapsody (steve huntington)
Decrease font size
Increase font size
Topic Title: Scoped Locking Design Pattern in Rhapsody
Topic Summary:
Created On: 23-Aug-2005 17:57
Status: Read Only
Linear : Threading : Single : Branch
Search Topic Search Topic
Topic Tools Topic Tools
Subscribe to this topic Subscribe to this topic
E-mail this topic to someone. E-mail this topic
Bookmark this topic Bookmark this topic
View similar topics View similar topics
View topic in raw text format. Print this topic.
 23-Aug-2005 17:57
User is offline View Users Profile Print this message


Thomas Zeng

Posts: 3
Joined: 9-Jun-2005

Dear Dr.:

You are the author of Real Time Design Patterns, right?

I'd like to find out whether Rhapsody provides a template class that implements the scoped locking (aka Guard) pattern, similar to the ACE_Guard at:

[url]http://www.dre.vanderbilt.edu/Doxygen/Current/html/ace/classACE__Guard.html[/url]

The purpose is to provide automatic acquisition and release of a semaphor, and be safe to exceptions.

thanks
-thomas
Report this to a Moderator Report this to a Moderator
 23-Aug-2005 23:29
User is offline View Users Profile Print this message


Thomas Zeng

Posts: 3
Joined: 9-Jun-2005

I think I found the answer: OMResourceGuard class.
Report this to a Moderator Report this to a Moderator
 24-Aug-2005 12:48
User is offline View Users Profile Print this message


Bruce Douglass

Posts: 169
Joined: 30-Jun-2004

The normal approach in Rhapsody is to mark the operation as Guarded in Rhapsody. Then RHapsody generates a semaphore for the class instance that guards all of the guarded operations for that instance.

- b
Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic Rhapsody forum.
There are currently 1 users logged in.
You have posted 0 messages to this forum. 0 overall.

FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.