Difference between revisions of "Uno/Spec/Thread Unsafety Bridge"

From Apache OpenOffice Wiki
< Uno‎ | Spec
Jump to: navigation, search
m (Improved style.)
 
(8 intermediate revisions by the same user not shown)
Line 1: Line 1:
state:   draft          <br>
+
Type: Specification State: stable
type:    specification <br>
+
  
== Thread Unsafety Bridge ==
+
==Feature==
 +
This [[../Bridge|bridge]] protects [[Uno/Term/Thread Unsafe|thread-unsafe]] objects from being called by multiple threads in parallel.
  
=== Feature ===
+
Only one thread at a time can enter a [[Uno/Term/Thread Unsafe|thread-unsafe]] environment, a [[Uno/Term/Thread Unsafe|thread-unsafe]] environment is entered, if any thread has one of the methods provided by the <code>Enterable</code> API on the stack.
This [[../Bridge|bridge]] protects [[Uno/Term/Thread Unsafe|thread unsafe]] objects from being called by multi threads simultaneously. It does this by acquring a dedicated mutex before actually doing the call.
+
  
A [[../Purpose Bridge|purpose bridge]] protecting [[Uno/Term/Thread Unsafe|thread unsafe]] objects:
+
==API==
* <code>enter</code>: Aquires the mutex of the associated [[../Environment|Environment]].
+
Environment purpose named <code>":unsafe"</code>.
* <code>leave</code>: Releases the mutex of the associated [[../Environment|Environment]].
+
  
* <code>callInto</code>: Acquires the mutex of the associated [[../Environment|Environment]] and calls the desired method.
+
==Dependencies==
* <code>callOut </code>: Calls the desired method, while keeping the mutex of the associated [[../Environment|Environment]] acquired.
+
 
+
=== Rationale ===
+
 
+
=== API ===
+
[[../Purpose Bridge|Purpose bridge]] named <code>":unsafe"</code>.
+
 
+
=== Dependencies ===
+
 
* [[../Environment Stack]]
 
* [[../Environment Stack]]
  
  
 +
[[Category:Draft]]
 +
[[Category:Spec]]
 +
[[Category:Uno]]
 
[[Category:Uno:Spec]]
 
[[Category:Uno:Spec]]
 +
[[Category:Multi-Threading]]

Latest revision as of 07:23, 19 June 2007

Type: Specification State: stable

Feature

This bridge protects thread-unsafe objects from being called by multiple threads in parallel.

Only one thread at a time can enter a thread-unsafe environment, a thread-unsafe environment is entered, if any thread has one of the methods provided by the Enterable API on the stack.

API

Environment purpose named ":unsafe".

Dependencies

Personal tools