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

From Apache OpenOffice Wiki
< Uno‎ | Spec
Jump to: navigation, search
(Spec Thread Unsafey Bridge)
 
 
(11 intermediate revisions by the same user not shown)
Line 1: Line 1:
version: {{REVISIONID}} <br>
+
Type: Specification  State: stable
state:   draft          <br>
+
type:    specification  <br>
+
  
== Thread Unsafe Bridge ==
+
==Feature==
 +
This [[../Bridge|bridge]] protects [[Uno/Term/Thread Unsafe|thread-unsafe]] objects from being called by multiple threads in parallel.
  
; Description
+
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 [[Uno/Spec/Bridge|Bridge]] protects [[Uno/Spec/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.
+
  
; Feature:
+
==API==
: A [[Uno/Spec/Protocol Bridge|Protocol Bridge]] protecting [[Uno/Spec/Thread Unsafe|Thread Unsafe]] objects:
+
Environment purpose named <code>":unsafe"</code>.
: - <code>enter</code>: Aquires the mutex of the associated [[Uno/Spec/Environment|Environment]].
+
: - <code>leave</code>: Releases the mutex of the associated [[Uno/Spec/Environment|Environment]].
+
:
+
: - <code>callInto</code>: Acquires the mutex of the associated [[Uno/Spec/Environment|Environment]] and calls the desired method.
+
: - <code>callOut </code>: Calls the desired method, while keeping the mutex of the associated [[Uno/Spec/Environment|Environment]] acquired.
+
  
; Rationale
+
==Dependencies==
:
+
* [[../Environment Stack]]
  
; API
 
: [[Uno/Spec/Protocol Bridge|Protocol Bridge]] named <code>"unsafe"</code>.
 
 
; Compatibility Issues: None.
 
 
; Dependencies:
 
:* EnvStack
 
  
 +
[[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