Semaphore (dictionary item)
For automation interface information about a Semaphore, see
Semaphore (automation interface).
A Semaphore imposes mutual exclusion on data resources, allowing each task exclusive and uninterrupted access. There are two types of semaphore, the binary semaphore controlling a single resource, and the counting semaphore which looks after a set of identical resources. Wait and Synchronizer are usually used to enforce mutual exclusion.
You can create a Semaphore through the context menu of a Package: right-click the Package, and select > > > .
When used on a diagram, a Semaphore's notation is as follows:
In the Modeler panes, a short-cut symbol
on the Semaphore's icon indicates that the item is a stub.
The following sections provide information about how a Semaphore is used in the model. For more information about a property, item, model part or diagram, click it.
Properties
In addition to the standard properties, a Semaphore has these properties:
• Count Max (Max Count through the automation interface)
• Counting (Is Counting through the automation interface)
| The Class box on the Options tab of a Semaphore's Property Pages shows the Class, Data Type or Interface that owns the Operations that implement the Semaphore. |
Owned by
Owns
Dependency - The Dependency is owned jointly by the Semaphore and the other associated item. The access permissions you have to a Dependency are determined by the access permissions of the dependent item.
Defined in these parts of the model
Shown on these diagrams
Can be linked to these dictionary items
In addition to the owning
Package or
Model, a Semaphore can be linked to the following items.
Class - The linked Class contains the Operations required to implement the Semaphore (drag Class to Semaphore symbol on diagram).
Data Type - The linked Data Type contains the Operations required to implement the Semaphore (drag Data Type to Semaphore symbol on diagram).
Interface - The linked Interface contains the Operations required to implement the Semaphore (drag Interface to Semaphore symbol on diagram).