![]() |
Telelogic Rhapsody (steve huntington) | ![]() |
Topic Title: Scoped Locking Design Pattern in Rhapsody Topic Summary: Created On: 23-Aug-2005 17:57 Status: Read Only |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() |
|
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 |
|
![]() |
|
![]() |
|
I think I found the answer: OMResourceGuard class.
|
|
![]() |
|
![]() |
|
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 |
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.